Created
November 28, 2017 19:39
-
-
Save paulw11/fc996d00fceefd138094b5fc2e455902 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Dictionary where Key == String { | |
func isNullOrEmpty(key: String) -> Bool { | |
guard let value = self[key] else { | |
return true | |
} | |
if value as? NSNull == NSNull() { | |
return true | |
} | |
return false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment