Check for invalid input
Check for invalid input