Avoid unnecessary `KeyError`'s while testing.