I have the following block in a project I have been moved onto after a previous developer has left
NSObject *object = (NSObject *)string;
if([object isEqual:[NSNull null]])
return @"none"
Where string
is an NSString *
returned from a dictionary.
While I undertand that NSNull needs to be checked for, can someone tell me why cast to NSObject first?