test if key exists