title: -[__NSArrayM insertObject:atIndex:]: object cannot be nil
body: <p>I am getting error object cannot be nil. I am using web service, when I parse it using loop it crashed and send output <code>-[__NSArrayM insertObject:atIndex:]:</code> object cannot be nil as error, because I have null value on blank value in <code>NSMutableArray</code> which I am trying to parse.</p>
  
  <p>I tried to fix with these methods:</p>
  
  <pre><code>(1) if([Array containsObject:[NSNull null]])  
  (2) if([Array objectAtIndex:0  
  (3) if([Array objectAtIndex:counter] == 0**
  </code></pre>
  
  <p>My code is,</p>
  
  <pre class="lang-c prettyprint-override"><code>if([[[node childAtIndex:counter] name] isEqualToString:@"Phone"]){
  
      if([phoneno containsObject:[NSNull null]]){
          phone.text = @"-";
      }
      else{
          NSString *str = [[node childAtIndex:counter] stringValue];
          [phoneno addObject:str];
          NSString *myString = [phoneno componentsJoinedByString:@","];
          [phone setText:myString];
          phone.text = [NSString stringWithFormat:@"%@",myString];
      }
  }
  </code></pre>
  
  <p>Here, phoneno is NSMutableArray</p>