code: def validate(data):
      
      if not isinstance(data, dict):
          error('Data must be a dictionary.')
      for value in data.values():
          if not isinstance(value, basestring):
              error('Values must be strings.')
docs: Query data and result data must have keys who's values are strings.