code: public static boolean isStringTrue(String in) {
      if (in == null)
        return false;
      return in.equalsIgnoreCase("TRUE") || in.equalsIgnoreCase("YES") || in.equals("1");
    }
docs: Returns true if the string is 'TRUE' or 'YES' or '1', case insensitive.
  False for null, empty, etc.