Cocoa - Pasing JSON crash on null <p>What is the best way to prevent my app from crash?</p> <p>I'm using a JSON service that sometimes get NULL fields. What is the best way to prevent it?</p> <p>Right now, I've to do this on every field:</p> <pre><code>if(![[[[Dictionary objectForKey:@"option"] objectForKey:@"option"] objectForKey:@"option"] isKindOfClass:[NSNull class]]) </code></pre> <p>The problem is that the Dic is very complex, and sometimes I even get no the field I look for. So that's a lot of validations.</p>