title: NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 0 beyond bounds for empty array
body: <p>Well, I know the cause of the error, my question here is how to avoid this kind of error. In my case, what I want is, if the user enters a wrong id which means when the array return 0 results, is says for example : </p>
  
  <pre><code>NSLog (@"The id you entered is false !");
  </code></pre>
  
  <p>else, it proceeds the code normally without crashing.</p>
  
  <p>Any ideas on how I can solve it ?</p>