from datetime import datetime


def fromisoformat(s):
    """

    >>> fromisoformat('2021-05-03T01:48:37Z')
    datetime.datetime(2021, 5, 3, 1, 48, 37, tzinfo=datetime.timezone.utc)

    >>> repr(fromisoformat(None))
    'None'
    """
    if not s or s == 'null':
        return None
    if s.endswith('Z'):
        s = s[:-1]+'+00:00'
    return datetime.fromisoformat(s)