However, I think it would actually be better to just return an empty string here, and let the consumer decide what to do if it's empty. Otherwise, it sort of becomes a "constant", and it has to be hard-coded in the consumer as well. So I would recommend:
`device_info[value] = device.name or ""`