Fixed check for user entered data, and data validation