code: private boolean isNullable(ImmutableTerm term, ImmutableSet<Variable> nullableChildVariables) {
          if (term instanceof Constant)
              return term.equals(termFactory.getNullConstant());
          // TODO: improve this
          else if (term.isGround())
              return false;
          // TODO: improve this
          return term.getVariableStream()
                  .anyMatch(nullableChildVariables::contains);
      }
docs: TODO: involve the function to reduce the number of false positive