test key existence in a map