title: Bugg with NSDictonary sometimes crashes with "Trying to insert nil" response
body: <p>I´m having a great deal of trouble with a bugg that in some cases gives the "initWithObjects:forKeys:count:]: attempt to insert nil object from objects[6]'" error message. It´s only occurring around every third trial and in the other cases it works fine. I haven´t debugged buggs that happeds at certain situations so that´s whyI´m asking for help. It might be difficult to find a solution but I would be glad to receive some advice atleast where to start look for the issue and how to debug it?</p>
  
  <p>Basically my app have a method that sends a NSDictonary list with objects to a server. In some cases I want to remove an object if the user have´t chosen anything for that list. Problem is that the server died´t like sending an object with an empty space. So I made a kind of not nice looking work around. Basically The IBaction checks if the Object contains nil. If it contains nil it redirects to a very similar NSDictonary without the Object containing Nil. It woks in some cases but it seems like it sometimes don´t recognize the object containing nil.</p>
  
  <p>Here´s the code in Inaction that redirects the code. I haven´t created a method for inserting anything to the object:@"DefaultCreateImageID" yet so as far as I know it should always be nil.</p>
  
  <pre><code> NSString *Imagestuff= [[NSUserDefaults standardUserDefaults] objectForKey:@"DefaultcreateImageID"];
      if ( [[NSUserDefaults standardUserDefaults] objectForKey:@"DefaultcreateImageID"] !=  ( NSString *) [NSNull null]  ){
      DataHandler *handler = [DataHandler sharedDatahandler];
      handler.authenticateUserDelegate = self;
      [handler createActivityNoImage];
          NSLog(Imagestuff);
      }
  
      else
      {
          DataHandler *handler = [DataHandler sharedDatahandler];
          handler.authenticateUserDelegate = self;
          [handler createActivity];
  
      }
  </code></pre>
  
  <p>Thanks!  </p>