fix device listing in case device.type() is undefined