def METHOD_NAME(item):
    # postgres crashes on empty strings, but is happy to take null dates
    if item:
        if isinstance(item, str):
            try:
                return iso_string_to_date(item)
            except ValueError:
                try:
                    return iso_string_to_datetime(item, strict=True).date()
                except ValueError:
                    return None
        elif isinstance(item, datetime):
            return item.date()
        elif isinstance(item, date):
            return item
    return None