code: function toBoolean(val, def) {
      if (is_1.isBoolean(val))
          return val;
      if (!is_1.isValue(val))
          return toDefault(null, def);
      val = val.toString();
      return (parseFloat(val) > 0 ||
          is_1.isInfinite(val) ||
          val === 'true' ||
          val === 'yes' ||
          val === '1' ||
          val === '+');
  }
docs: To Boolean
  Converts value if not boolean to boolean.
  Will convert 'true', '1', 'yes' or '+' to true.
  
  @param val the value to inspect.
  @param def optional default value on null.