How to check NSArray is null or empty in iOS?

if (array == nil || [array count] == 0) {
    ...
}

NSArray has the count method, a common way to do it would be...

if (![self.myArray count])
{
}

That will check if the array has nothing in it, or if it is set to nil.


While we are all throwing out the same answers, I thought I would too.

if ([array count] < 1) {
    ...
}