Add methods for key existence checking

The APIs diverge a bit here, since each language has its own convention for checking for key existence. Feature-wise they should be the same. Also includes some refactorings to remove exceptions as control flow and unnecessary passing of instance variables.

Will close #48