avoid npe when an unknown device type has appear