code: public static SoyValue callLegacySoyFunction(
        LegacyFunctionAdapter fnAdapter, List<SoyValue> args) {
      for (int i = 0; i < args.size(); i++) {
        if (args.get(i) == null) {
          args.set(i, NullData.INSTANCE);
        }
      }
      return handleTofuNull(fnAdapter.computeForJava(args));
    }
docs: Helper function to translate null -> NullData when calling LegacyFunctionAdapters that may
  expect it.
  
  <p>In the long run we should either fix ToFu (and all SoyJavaFunctions) to not use NullData or
  we should introduce custom SoyFunction implementations for have come from SoyValueProvider.