def is_observed_holiday(dt, calendar):
    """ Return True if dt is a holiday in calendar. Return `False` if `calendar` is `None`."""
    if calendar is None:
        return False
    return dt in calendar.holidays(start=dt, end=dt, return_name=False)
