If this is assuming ES5 (i.e. `undefined` is not tampered with) then using typeof here is overkill. As is a direct comparison - just use `if (global) { ... }`