def get_user_course_modified_date(uc):
    """Return the latest modified date, or None for an empty UserCourse."""
    dates = [
        uc.course_review.comment_date,
        uc.course_review.rating_change_date,
        uc.professor_review.comment_date,
        uc.professor_review.rating_change_date,
    ]

    valid_dates = sorted(filter(None, dates), reverse=True)

    date = None
    if len(valid_dates) > 0:
        date = valid_dates[0]

    return date