[master 17/22] Add a check to determine whether the device type is supported.