title: How to check if NSDictionary key is NULL
body: <p>I'm trying to check if an object exist for the key <code>next_max_id</code> in my JSON response dictionary.
  I've tried the following ways to check:</p>
  
  <ul>
  <li><code>if ([[pagination objectForKey:@"next_max_id"] isKindOfClass:[NSNull class]]) ...</code></li>
  <li><code>if ([pagination objectForKey:@"next_max_id"] == [NSNull class]) ...</code></li>
  <li><code>if ([pagination objectForKey:@"next_max_id"]) ...</code></li>
  </ul>
  
  <p>However, when the pagination dictionary is empty i.e. (<code>pagination = {};</code>), I get these error messages:</p>
  
  <pre><code>-[NSNull objectForKey:]: unrecognized selector sent to instance ...
  *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull objectForKey:]: unrecognized selector sent to instance ...
  </code></pre>
  
  <p>How else can I check for if the object or rather the key exist, without a crash?</p>
  
  <p>Updated:
  When the key <code>next_max_id</code> exist inside <code>pagination</code>, the JSON response would be like this </p>
  
  <pre><code>"pagination": {
      "next_url": "https://api.instagram.com/v1/tags/puppy/media/recent?access_token=fb2e77d.47a0479900504cb3ab4a1f626d174d2d&amp;max_id=13872296",
      "next_max_id": "13872296"
  }
  </code></pre>