1. If it is NSString
you can check its length and if it is an NSArray
you check its count.
2. You can simply put it in if condition, condition will return YES
only in case of the object is not nil.
Example:
if (object)
{
//do your task here
}
3. In Objective-C You can check it by its class.
if (![object isKindOfClass:[NSNull class]])
{
// do your task here
}
The NSNull class defines a singleton object used to represent null values in collection objects (which don’t allow nil values).