Don't assume that you'll get the things you want until you have them. if (window.googletag) {googletag.cmd.push(function() { googletag.display('dcomMobileSERPDisplayTopAd-300x250'); });} else {console.error('googletag not defined, dcomMobileSERPDisplayTopAd-300x250');}