title: How to error check for a `null` object by the `json` interpreter in iOS
body: <p><strong>update: I think the error is coming from a missing key in the data feed and not a key with a null value.</strong></p>
  
  <p>I've been running into a <code>null</code> object by the <code>json</code> interpreter and thought this code would error check and avoid the crash. It's not working though. I need to check to avoid this error message and crash:</p>
  
  <pre><code>imageurl string is &lt;null&gt;
  2013-09-09 12:35:26.928 1000 [1539:690b] -[NSNull length]: unrecognized selector sent to instance
  
  if (![imageUrlString isKindOfClass:[NSNull class]])
  {
  
      imageUrlString = [userImageArray objectAtIndex:indexPath.row];
  
  
  } else {
  
      cell.thumbnailImageView.image = [UIImage imageNamed:@"rest.png"];
  
  }
  </code></pre>
  
  <p>fyi - it works if the image string exists and is only crashing when a null object is encountered.</p>
  
  <p>the output from nslog:</p>
  
  <p>when a null obj is encountered: <code>imageurl string is (null)</code> </p>
  
  <p>when it works: <code>imageurl string is http://******.com/uploads/users/35/profile.jpeg</code></p>
  
  <p>thanks for help</p>