Check window && window.document, barf if loaded in server-side node environment vs. in a browser.