Skip to content

Instantly share code, notes, and snippets.

@paulw11
Created November 28, 2017 19:39
Show Gist options
  • Save paulw11/fc996d00fceefd138094b5fc2e455902 to your computer and use it in GitHub Desktop.
Save paulw11/fc996d00fceefd138094b5fc2e455902 to your computer and use it in GitHub Desktop.
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