Making sure the device is valid on the device_kind variable