In the code below I thought the second condition would be true, but it is turning out as false. Am I missing something? Please help me understand.
NSArray *a
You should be using isKindOfClass. Refer this for the difference.