Checking a null value in Objective-C that has been returned from a JSON string

<null> is how the NSNull singleton logs. So:

if (tel == (id)[NSNull null]) {
    // tel is null
}

(The singleton exists because you can’t add nil to collection classes.)

Leave a Comment