def is_blank(val):
    """Returns True iff the field appears to be missing.

    Empty string, None, and NaN are treated as missing values. Missing values are not
    invalid (unless the field is required), and will not be reported/logged.
    """
    return val is None or val != val or (isinstance(val, str) and val.strip() == "")