rm type checking