Don't assume that the input being validated is a string

An integer value will throw an error. Convert to a string before performing regex
Merge pull request #1 from benschwarz/patch-1

Don't assume that the input being validated is a string