Defensive programming added to InputWords

Program now catches characters that are entered for the amount of words.