docs: public static boolean isSelected(final IThymeleafBindStatus bindStatus, final Object candidateValue) {
  
          if (bindStatus == null) {
              return (candidateValue == null);
          }
  
          // Check obvious equality matches with the candidate first,
          // both with the rendered value and with the original value.
          Object boundValue = bindStatus.getValue();
          if (ObjectUtils.nullSafeEquals(boundValue, candidateValue)) {
              return true;
          }
          Object actualValue = bindStatus.getActualValue();
          if (actualValue != null && actualValue != boundValue &&
                  ObjectUtils.nullSafeEquals(actualValue, candidateValue)) {
              return true;
          }
          if (actualValue != null) {
              boundValue = actualValue;
          } else if (boundValue == null) {
              return false;
          }
  
          // Non-null value but no obvious equality with the candidate value:
          // go into more exhaustive comparisons.
          boolean selected = false;
          if (boundValue.getClass().isArray()) {
              selected = collectionCompare(CollectionUtils.arrayToList(boundValue), candidateValue, bindStatus);
          } else if (boundValue instanceof Collection) {
              selected = collectionCompare((Collection<?>) boundValue, candidateValue, bindStatus);
          } else if (boundValue instanceof Map) {
              selected = mapCompare((Map<?, ?>) boundValue, candidateValue, bindStatus);
          }
          if (!selected) {
              selected = exhaustiveCompare(boundValue, candidateValue, bindStatus.getEditor(), null);
          }
          return selected;
  
      }