code: private boolean isUndefinedTypeofGuardReference(Node reference) {
      // reference => typeof => `!=`
      Node undefinedTypeofGuard = reference.getGrandparent();
      if (undefinedTypeofGuard != null
          && isUndefinedTypeofGuardFor(undefinedTypeofGuard, reference)) {
        Node andNode = undefinedTypeofGuard.getParent();
        return andNode != null
            && andNode.isAnd()
            && isInstanceofFor(andNode.getLastChild(), reference);
      } else {
        return false;
      }
    }
docs: Is the reference node the first {@code Ref} in an expression like {@code 'undefined' != typeof
  Ref && x instanceof Ref}?
  
  <p>It's safe to ignore this kind of reference when moving the definition of {@code Ref}.