The changes I suggested are to avoid throwing exceptions if the keys are not found. If `value` is not in `entry`, `.get('value')` will return `None` which will raise and exception when `.get('target')` is called.