I am trying to detect if the dictionary coming from API is empty or has values but whenever i am trying to do Dict.count it crashes.

```
if let personalInfo = self.scanResult?.fields { // personalInfo has 0 values but not nil

let image = NSData(base64EncodedString: (personalInfo["Photo"] as? String)!, options: NSDataBase64DecodingOptions(rawValue: 0)) // Crashes
}

```

I also tried isEmpty and it crashes there as well.