check for invalid input before run