Trivial change, but you could say `sn_empty = not identity.get('sn')` if you wanted