Better error message for input check