check device not none

Why didn't this line work before? None should be a falsy value. I'm not sure the logic has changed here.