Exception handling

We should evaluate what the failure behavior of our functions should be, and accordingly, our functions should throw the correct exceptions back for faster resolution.