Note, this is good if you expect it to really be a niche case for the KeyError. If you expect the exception to get triggered frequently, then it is much slower