def clean_dict(dictionary):
    """ Remove items with None value in the dictionary and recursively in other nested dictionaries. """
    if not isinstance(dictionary, dict):
        return dictionary
    return {k: clean_dict(v) for k, v in dictionary.items() if v is not None}