Undefined Chrome API protection

If chrome.session.getDevices or chrome.history.query is undefined, return `false` up the chain