Check for numbers first to prevent Fixnum errors

When a number is passed (the default attribute) without this fix, a `.downcase` is attempted on a `Fixnum` type and causes an error. This changes the check to look for a valid digit first, then check for strings.