def is_field(field):
    """Check if the given object is a valid field

    A field is valid if it has at least a name and a value
    attribute/property.
    """
    for attr in('name', 'value'):
        if not hasattr(field, attr):
            return False
        if field.name is None or field.value is None:
            return False
    if not isinstance(field.name, str):
        return False
    return True