Added error checking code

Added a case so the game can handle unexpected input.