check user input