docs: String convertToString(Object value) {
          if (value == null) {
              return null;
          } else if (value instanceof String) {
              return (String) value;
          } else if (value instanceof List) {
              List<?> list = ((List<?>) value);
              if (list.size() == 0) {
                  return EvaluationContext.EMPTY_STRING;
              } else if (list.size() == 1) {
                  String strValue = String.valueOf(list.get(0));
                  return escapeValue(strValue);
              } else {
                  StringBuilder builder = new StringBuilder();
                  Iterator<?> iterator = list.iterator();
                  while (iterator.hasNext()) {
                      String strValue = String.valueOf(iterator.next());
                      strValue = escapeValue(strValue);
                      builder.append(strValue);
                      if (iterator.hasNext()) {
                          builder.append(", ");
                      }
                  }
                  return builder.toString();
              }
          } else if (value instanceof String[]) {
              String[] array = (String[]) value;
              if (array.length == 0) {
                  return EvaluationContext.EMPTY_STRING;
              } else if (array.length == 1) {
                  return escapeValue(array[0]);
              } else {
                  StringBuilder builder = new StringBuilder();
                  for (int i = 0; i < array.length; i++) {
                      String strValue = escapeValue(array[i]);
                      builder.append(strValue);
                      if (i + 1 < array.length) {
                          builder.append(", ");
                      }
                  }
                  return builder.toString();
              }
          } else if (value.getClass().isArray()) {
              int size = Array.getLength(value);
              if (size == 0) {
                  return EvaluationContext.EMPTY_STRING;
              } else if (size == 1) {
                  String strValue = String.valueOf(Array.get(value, 0));
                  return escapeValue(strValue);
              } else {
                  StringBuilder builder = new StringBuilder();
                  for (int i = 0; i < size; i++) {
                      String strValue = String.valueOf(Array.get(value, i));
                      strValue = escapeValue(strValue);
                      builder.append(strValue);
                      if (i + 1 < size) {
                          builder.append(", ");
                      }
                  }
                  return builder.toString();
              }
          } else {
              return value.toString();
          }
      }