I'd maybe change this to `key.try(:id)` to be safe.