def validate_key(key)
      unless key.is_a?(Symbol) || key.is_a?(String)
        raise ArgumentError, 'Key must be a string or symbol'
      end
      key
    end
def validate_key(key)
      unless key.is_a?(Symbol) || key.is_a?(String)
        raise ArgumentError, 'Key must be a string or symbol'
      end
      key
    end
Make sure the key is valid