Added input validation, crash fix to hangman