title: rangeOfString returning not nil every time
body: <p>Whenever there is an error, which is stored in the variable <code>errorString</code>, I want to check if the error has the String, <code>"missing username"</code>. And if the <code>errorString</code> indeed has the String <code>"missing username"</code>, set <code>errorString</code> as <code>"missing email address"</code>. However, even if the <code>errorString</code> does not have <code>"missing username"</code>, <code>errorString</code> is set as <code>"missing email address"</code>. For example, even if the <code>errorString = 2015-09-08 11:44:39.937 ParseStarterProject-Swift[15182:93559] [Error]: invalid email address (Code: 125, Version: 1.8.2)</code>, it still sets <code>errorString</code> as <code>"missing email address"</code>. The part of the code where the problem lies is here:</p>
  
  <pre><code>if (errorString?.rangeOfString("missing username") != nil) {
      errorString = "missing email address"
  }
  </code></pre>
  
  <p>And the rest of the relevant code is here:</p>
  
  <pre><code>@IBAction func signUp(sender: AnyObject) {
      let user = PFUser()
      user["firstName"] = firstName.text
      user["lastName"] = lastName.text
      user.email = emailAddress.text
      user.password = password.text
      user.username = emailAddress.text
  
      user.signUpInBackgroundWithBlock { (succeeded: Bool, error: NSError?) -&gt; Void in
          if let error = error {
              var errorString = error.userInfo?["error"] as? NSString
              errorString = String(errorString!)
              print(errorString)
  
              if (errorString?.rangeOfString("missing username") != nil) {
                  errorString = "missing email address"
              }
  
              let alertController = UIAlertController(title: "", message: "\(errorString!)", preferredStyle: UIAlertControllerStyle.Alert)
              alertController.addAction(UIAlertAction(title: "Ok", style: .Default, handler: { (action: UIAlertAction!) in
                  println("Handle Ok logic here")
              }))
              self.presentViewController(alertController, animated: true, completion: nil)
          } else {
  
          }
      }
  }
  </code></pre>