public static boolean isHandledByInspectOrToString(@Nullable Object arguments) {
    if (arguments == null) {
      return true;
    }
    if (arguments instanceof Range) {
      return true;
    }
    if (arguments instanceof Collection) {
      return true;
    }
    if (arguments instanceof Map) {
      return true;
    }
    if (arguments instanceof Element) {
      return true;
    }
    if (arguments instanceof String) {
      return true;
    }

    Class<?> argumentsClass = arguments.getClass();
    if (argumentsClass.isArray()) {
      return argumentsClass.getComponentType().isPrimitive()
        || ReflectionUtil.isToStringOverridden(argumentsClass.getComponentType());
    }

    return ReflectionUtil.isToStringOverridden(argumentsClass);
  }
Returns true if the Object is handled properly by {@link org.codehaus.groovy.runtime.InvokerHelper#inspect(java.lang.Object)}
or {@link org.codehaus.groovy.runtime.InvokerHelper#toString(Object)}, either by special handling or if the Class has
an own {@code toString()} implementation.
spock-core/src/main/java/org/spockframework/util/RenderUtil.java