Improve error message for argument type mismatch