better argument type checking