Check user input func