import typing
from datetime import datetime


def s2dt(s: str) -> typing.Optional[datetime]:
    """ Parses a string and turns it into a datetime object.

    :param s: String to parse.
    """

    if s == "":
        return None

    return datetime.strptime(s, '%d.%m.%Y %H:%M')