test for key existence