Cast as NSTextCheckingTypes to suppress warning created by this oddity of the SDK