Added input checking

Added checks to better handle user input, and hopefully stop the program
from crashing if a non-numeric input is entered.