Added error checking to the user-input on number of hours