Changes exception type to InvalidArgument