Changed isNumeral() to switch rather than try/catch