title: Check if key exists in NSDictionary is null or not
body: <p>I did search on how to check if NSDictionary key exists or not and came up with the solution. But still it throws me an error saying adding null value to the key. 
  I am not sure if my code is correct or not. If anyone has any idea about this can help me.</p>
  
  <pre><code>NSDictionary *result;
  id myImageURL = [result objectForKey:@"url"];
  if ((NSNull *)myImageURL == [NSNull null])
      myImageURL = @"";
  
  id myImage = [result objectForKey:@"image"];
  if ((NSNull *)myImage == [NSNull null])
      myImage = @"";
  </code></pre>
  
  <p>Check if null add nothing and if not add the value. But it still gives me an error dont know why.</p>
  
  <pre><code>/****OUTPUT*****/
  
  2011-08-11 14:56:06.668 Tab_Table_Win[6510:207] RESULTS : {
  image = "&lt;UIImage: 0xbc332c0&gt;";
  url = "http://a3.twimg.com/profile_images/999228511/normal.jpg";
  }
  
  2011-08-11 14:56:06.669 Tab_Table_Win[6510:207] url : http://a3.twimg.com/profile_images/999228511/normal.jpg
  2011-08-11 14:56:06.670 Tab_Table_Win[6510:207] IMage : &lt;UIImage: 0xbc332c0&gt;
  
  /*****Breaks Here ***/
  
  2011-08-11 14:56:06.876 Tab_Table_Win[6510:207] RESULTS : {
  }
  2011-08-11 14:56:06.878 Tab_Table_Win[6510:207] url : (null)
  2011-08-11 14:56:06.879 Tab_Table_Win[6510:207] IMage : (null)
  2011-08-11 14:56:06.881 Tab_Table_Win[6510:207] *** Terminating app due to uncaught    exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary setObject:forKey:]: attempt to insert nil key'
  </code></pre>