title: How to check NSDictionary for key using Objective-C literals
body: <p>When <strong>parsing JSON, I get NSDictionary</strong> and go through it one (known) key at a time. When debugging a bug, I started wondering: how should I handle <strong>missing key vs value which is zero?</strong></p>
  
  <p>Earlier I would have used something like this to check if key exists or not:</p>
  
  <pre><code>    if ([dict objectForKey:@"public"])
          newItem.isPublic = [dict objectForKey:@"public"] ? YES : NO;
  </code></pre>
  
  <p>but now I wrote this using Objective-C object literals. Just started wondering, what does this check actually do:</p>
  
  <pre><code>    if (dict[@"public"])
          newItem.isPublic = dict[@"public"] ? @YES : @NO;
  </code></pre>
  
  <p>Should I check against nil or [NSNull null] or is there some easier, obvious, way?</p>