I\'m unwrapping two values from a dictionary and before using them I have to cast them and test for the right type. This is what I came up with:
var latitude
Swift 3.0
if let latitudeDouble = latitude as? Double, let longitudeDouble = longitude as? Double { // do stuff here }