Added exception handling

Program now checks user input to make sure it can be cast as a float
before continuing.