strengthen type checking