title: how to check a null value in textbox
body: <p>I've been working recently in Xcode. I've used a table view with 4 text boxes, and on a button click i'm checking whether any of the text boxes have a null value if not saving it in a local file. </p>
  
  <p>The code is given below </p>
  
  <pre><code>NSString *FName, *LName, *Email, *Pwd;
  
  FName=registerFirstName.text;
  LName=registerLastName.text;
  Email=registerEmail.text;
  Pwd=registerPassword.text;
  
  BOOL fileexists=[[NSFileManager defaultManager]fileExistsAtPath:storePath];
  if(!fileexists)
      [storeManager createFileAtPath:storePath contents:nil attributes:nil];
  
  if (FName !=NULL &amp;&amp; LName != NULL &amp;&amp; Email != NULL &amp;&amp; Pwd != NULL &amp;&amp; FName!=@"" &amp;&amp; LName!=@"" &amp;&amp; Email!=@"" &amp;&amp; Pwd!=@"") {
  
      UIAlertView *missingInfo=[[UIAlertView alloc]initWithTitle:@"Missing Details" message:@"All Fields Are Necessary" delegate:nil cancelButtonTitle:nil otherButtonTitles:@"OK", nil];
      [missingInfo show];
    } else {
      NSString *fullUserInfo;
      fullUserInfo=[NSString stringWithFormat:@"First Name:\t%@\nLast Name:\t%@\nEmail ID:\t%@\nPassword:\t%@",FName,LName,Email,Pwd];
      [fullUserInfo writeToFile:storePath atomically:YES encoding:NSUTF8StringEncoding error:nil];
      UIAlertView *test=[[UIAlertView alloc]initWithTitle:@"InfoSaved" message:fullUserInfo delegate:nil cancelButtonTitle:nil otherButtonTitles:@"OK", nil];
      [test show];
  }
  </code></pre>
  
  <p>When I run it in the simulator without entering any values, it did work showing an alert that missing fields. But when I typed some value in the text box and then erased it, if I clicked done to save it, it accepts null value and stores to it which i don't want to happen. Is there anything wrong with my logic in my code, or is there any other function by default in xcode to check for null?.</p>