title: check if value is integer or double in objective c
body: <p>I have a case where I should get the elements from an array and I do not know if the type is double or integer.</p>
  
  <p>[array objectAtIndex:2]</p>
  
  <p>and the problem is that I can not identify the type. If i knew the type I simply would perform:
  [[item objectAtIndex:2] intValue] or
  [[item objectAtIndex:2] doubleValue]</p>
  
  <p>Is there any way to detect that?</p>
  
  <p>Br,
  Gzim</p>