code: public static boolean stringToBooleanValue(String str) throws ExpressionException {
  	str = StringUtil.toLowerCase(str.trim());
  	if (str.equals("yes") || str.equals("true")) return true;
  	else if (str.equals("no") || str.equals("false")) return false;
  	throw new CasterException("Can't cast String [" + CasterException.crop(str) + "] to boolean");
      }
docs: cast a String to a boolean value (primitive value type)
  
  @param str String to cast
  @return casted boolean value
  @throws ExpressionException