title: if else statement when no data in plist - NSUserdefaults
body: <p>I'm just starting with Objective C and xcode. I've been exploring NSUserdefaults.</p>
  
  <p>I can save my text field's input to the plist file. Nad can retrive it to a label when the application launches again.</p>
  
  <p>What I can't do is get an alternative text to show IF the plist key is empty. Using the code below my label is just empty until I add text back to the plist via the text field. Any pointers please?</p>
  
  <pre><code>- (void)viewWillAppear:(BOOL)animated; 
  {
      NSUserDefaults *ud=[NSUserDefaults standardUserDefaults];
      NSString *theNewString=[ud objectForKey:@"textFieldKey"];
      // update the label
      if (theNewString) {
          [mylabel setText:theNewString];
      } else {
          [mylabel setText:@"nothing stored"];
      }
  }
  </code></pre>