code: public static boolean getBoolean(String key, boolean valueIfNull) {
          String value = System.getProperty(key);
          if (Strings.isNullOrEmpty(value)) {
              return valueIfNull;
          }
  
          value = value.trim().toLowerCase();
  
          if ("true".equals(value)) {
              return true;
          } else if ("false".equals(value)) {
              return false;
          }
  
          return valueIfNull;
      }
docs: Gets a system property boolean, or a replacement value if the property is
  null or blank or not parseable as a boolean.
  
  @param key
  @param valueIfNull
  @return