from datetime import datetime


def parse_due_date(line):
    """Parses due date from line.

    :param line: Line string.
    :type line: str
    :return: datetime.date if successful, None otherwise.
    :rtype: datetime.date or None
    """
    try:
        return datetime.strptime(line, '%d.%m.%Y').date()

    except ValueError:
        return None