checking for invalid argument