makes numberguess example robust against non-numeric inputs