title: How to allow NSMutableDictionary to accept 'nil' values?
body: <p>I have this statement:</p>
  
  <pre><code> [custData setObject: [rs stringForColumnIndex:2]  forKey: @"email"];
  </code></pre>
  
  <p>where <code>[rs stringForColumnIndex:2]</code> obtained from a SQLite3 d/b has a value of <code>nil</code>.  The app crashes giving me the error: </p>
  
  <pre><code>NSCFDictionary setObject:forKey:]: attempt to insert nil value (key: email)'
  </code></pre>
  
  <p>Is there a way to prevent this? (like a setting for <code>NSMutableDictionary</code>?)</p>
  
  <p>UPDATE:  this is what I finally did:</p>
  
  <pre><code>[custData setObject: ([rs stringForColumnIndex:2] != nil? [rs stringForColumnIndex:2]:@"") forKey: @"email"];
  </code></pre>