title: Detect URL valid for iOS
body: <p>I want to detect if the <code>URL</code> is valid. So I see the following function.</p>
  
  <pre><code>+ (id)URLWithString:(NSString *)URLString
  </code></pre>
  
  <p>As the <a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/Reference/Reference.html" rel="nofollow">Apple Documentation</a> said, an <code>NSURL</code> object initialized with <code>URLString</code>. If the <code>string</code> was malformed, returns <code>nil</code>. But actually, I call <code>URLWithString</code> with any <code>string</code>, it will return not <code>nil</code>. This documentation is wrong? 
  And could you provide a workaround to detect if <code>URL</code> is valid? </p>