Avatar
public func castIfClass(_ x: Any) -> AnyObject? { guard type(of: x) is AnyObject.Type else { return nil } return x as AnyObject }