It is not necessary - if there is no goog.global.document, the expression after the && will never be evaluated.