check device not none