Prevent TypeError

Stop throwing errors (Cannot call method 'match' of undefined) when typing non-numeric characters.
Merge pull request #32 from renancouto/patch-1

Prevent TypeError