package j8spec;

import static j8spec.J8Spec.var;
import static java.util.Objects.isNull;

class VarInitializer<T> implements UnsafeBlock {

    private final Var<T> variable;
    private final UnsafeFunction<T> function;
    private T value;

    VarInitializer(Var<T> variable, UnsafeFunction<T> function) {
        this.variable = variable;
        this.function = function;
    }

    @Override
    public void tryToExecute() throws Throwable {
        if (isNull(value)) {
            value = function.tryToGet();
        }
        var(variable, value);
    }
}

@@ -42,51 +42,9 @@
 pec.
-var;%0Aimport static java.util.Objects.isNull
+*
 ;%0A%0Ac
@@ -416,21 +416,21 @@
 if (
-isNull(value)
+value == null
 ) %7B%0A

Replace isNull with literal null