Implement the isalnum function

Implement the isalnum function as efficiently as you can..
How do you handle errors if you had to