exceptions for type checking