title: Getting "Array element cannot be nil" from Analyzer as a false-positive
body: <p>I have a case where the XCode analyzer is flagging valid code. </p>
  
  <p>We have an NSString category with a method <code>isEmpty</code> which checks if the string is empty, including checking for a nil string.  When it's used in combination with adding the string to an array, the analyzer complains:</p>
  
  <pre><code>if (![NSString isEmpty:myString]) {
      [_myArray addObject:myString];
  }
  </code></pre>
  
  <p>The analyzer will then complain with <code>Array element cannot be nil</code>, because it isn't smart enough to detect that <code>isEmpty</code> is preventing that.</p>
  
  <p>What's the best workaround? I know I can change the condition to <code>if (myString &amp;&amp; ![NSString isEmpty...</code> but that seems like a clunky workaround.</p>
  
  <p>EDIT:  By request, here's the body of <code>isEmpty</code>:  </p>
  
  <pre><code>+ (BOOL)isEmpty:(NSString *)string
  {
      return (string ? [string isEqualToString:@""] : YES); 
  }
  </code></pre>