Adding more error checking to inputs from GUI