Adding has_key functionality