replace get(key) to the dictionary like get(key, default) form without KeyError