Add more error checks on user input