I\'m iterating through a dictionary of [String: Any], looking for nils, so I can replace them with NSNull for a JSON write. My precomp
[String: Any]
nil
NSNull
if(object_getClass(yourVariable)?.description() == "NSNull") can be one of the way to check.
if(object_getClass(yourVariable)?.description() == "NSNull")