device type detect