You can just write: ``dev.model.type == DeviceType.unknown`` (``.id`` is no needed here).