Is there a shorter (characteristic) comparison for NULL?
[NSNull null] - 13 characters. You can say:
NSNull.null // << 11 (id)kCFNull // << 11
Or execute the function:
IsNSNull([p objectForKey@"somekey"]) // << 10 in this case and requires no ==, !=
Or (cringes) use the category:
[p objectForKey@"somekey"].mon_isNSNull // << 13 in this case, but requires no ==, !=
Just be careful what you call this category when dealing with nil receivers.
justin
source share