code: public static Boolean getBooleanSetting(Map<String, Object> settings, String key, Boolean defaultVal) {
  		final Object value = settings.get(key);
  
  		if (value == null) {
  			return defaultVal;
  		}
  		if (value instanceof Boolean) {
  			return (Boolean) value;
  		}
  		if (value instanceof String) {
  			return Boolean.valueOf((String) value);
  		}
  		return defaultVal;
  	}
docs: Gets a Boolean value for the key, returning the default value given if
  not specified or not a valid boolean value.
  
  
  @param settings
  @param key        the key to get the boolean setting for
  @param defaultVal the default value to return if the setting was not specified
  or was not coercible to a Boolean value
  @return the Boolean value for the setting