public Object visit(ForeachStatement node) {
            Block body = node.getBody();
            if (body != null) {
                node.setBody(visitBlock(body));
            }

            boolean guard = false;
            test: {
                Expression range = node.getRange();
                if (range != null) {
                    if (range.isExceptionPossible()) {
                        guard = true;
                        break test;
                    }
                    Type type = range.getType();
                    if (type != null && type.isNullable()) {
                        guard = true;
                        break test;
                    }
                }

                range = node.getEndRange();
                if (range != null) {
                    if (range.isExceptionPossible()) {
                        guard = true;
                        break test;
                    }
                    Type type = range.getType();
                    if (type != null && type.isNullable()) {
                        guard = true;
                        break test;
                    }
                }
            }

            if (!guard) {
                return node;
            }

            return new ExceptionGuardStatement(node, node.getInitializer());
        }