title: Crash on accessing a key that should be in an NSDictionary created from JSON
body: <p>I have a <code>dictionary</code> that sometimes reads a null value from some JSON data. When I do :</p>
  
  <pre><code> NSDictionary *caption=[image objectForKey:@"caption"]; //crash here!
  </code></pre>
  
  <p>Where the field <code>caption</code> is there but null, (in the JSON, <code>caption:null</code>), I get a crash.
  How can I eliminate this?</p>
  
  <p>I can check for null later on with:</p>
  
  <pre><code> NSDictionary *caption=[image objectForKey:@"caption"];
   NSString *text=@"";
   if( caption!=NULL  )
   {text=[caption objectForKey:@"text"];  }
  </code></pre>
  
  <p>but the crash comes even before this.</p>
  
  <p>This is how my dictionary is being built:</p>
  
  <pre><code> NSError *error = nil;
   NSDictionary *result = [NSJSONSerialization JSONObjectWithData:data options:0 error:&amp;error];
   NSArray *myResults=[result objectForKey:@"data"];
   long count=[myResults count];
  
   for(NSDictionary *image in myResults)
   {
         NSDictionary *links=[image objectForKey:@"images"];
         NSDictionary *standard=[links objectForKey:@"standard"];
         NSString *url=[standard objectForKey:@"url"];
  
         NSLog(@"image:%@",image);
         NSDictionary *caption=[image objectForKey:@"caption"]; //CRASH
  </code></pre>