def nillable_dict(func):
    """Decorator that retuns empty dictionary if input is None"""

    def wrapper(cls, element):
        if element is None:
            return {}
        else:
            return func(cls, element)
    return wrapper