Checking if an object is a given type in Swift Checking if an object is a given type in Swift swift swift