code: public static Boolean toBoolean(String s) {
          String value = trimToNull(s);
          if (value == null) {
              return null;
          }
  
          value = value.toLowerCase();
  
          if (trueValues.contains(value)) {
              return Boolean.TRUE;
          }
          if (falseValues.contains(value)) {
              return Boolean.FALSE;
          }
  
          throw new IllegalArgumentException("Invalid boolean value '" + s + "'");
      }
docs: <p>
  Attempts to return the best boolean representation for the specified string while remaining null-safe and
  ignoring any leading/trailing whitespace as well as case.
  </p>
  <p>
  This method simply uses a set of predefined values that it compares {@code s} to in order to determine the best
  {@code Boolean} representation. If {@code s} does not fall into either category, it is considered invalid and
  will result in an {@code IllegalArgumentException} being thrown.
  </p>
  
  @param s
  the string to be converted into a {@code Boolean}
  @return The {@code Boolean} representation of {@code s} or {@literal null} if {@code s} is {@literal null}.
  @throws IllegalArgumentException
  If {@code s} is non-{@literal null} <b>and</b> does not match any of the predefined values.