Add method to check if a key has a value