Another option, it's very easy to wrap a dict in a defaultdict:
class optionaldict(defaultdict):
"""
A defaultdict that disregards KeyErrors and returns None for missing keys.
"""
def __init__(self, *original, **kwargs):
super().__init__(lambda: None, *original, **kwargs)