code: public static boolean isValid(@Nullable final String booleanStr) {
          if (StringUtils.isBlank(booleanStr)) {
              return false;
          }
          final String lowerCaseBoolean = getLowerCaseString(booleanStr);
          return lowerCaseBoolean.equals(BooleanValues.TRUE) || lowerCaseBoolean.equals(BooleanValues.FALSE);
      }
docs: Given a boolean in string format, it checks if it's 'true' or 'false' (case insensitive)
  
  @param booleanStr the string to check
  @return true if booleanStr is 'true' or 'false' otherwise false