Changed try keyerror to in.

Closes #10.