Because I prefer a clear error message rather than relying on typecasting.
This implementation rely on strings, why not checking ?