def strip_lower_preparer(value):
    """Colander preparer that trims whitespace and converts to lowercase."""
    if isinstance(value, str):
        return value.strip().lower()
    else:
        return value