Gives a more informative error message for invalid arguments.