updated 'is this a worker?' check to be more portable (ipad wasnt working)