Reputation: 13267
How do I detect if a NSNumber is NULL? For example, I use a NSLog to display the value of a NSNumber and if there is an incorrect value, such as letters, it shows "null" in the log. Thanks for your help!
Upvotes: 2
Views: 5464
Reputation: 533
Can't you just do
NSNumber *testNumber;
if(testNumber == nil){
NSLog(@"the testNumber is nil");
}
Upvotes: 3