def validate(data):
    """
    Query data and result data must have keys who's values are strings.
    """
    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.')
Query data and result data must have keys who's values are strings.