code: func ToBool(val interface{}) bool {
  	if val == nil {
  		return false
  	}
  
  	v := reflect.ValueOf(val)
  	switch v.Kind() {
  	case reflect.Bool:
  		return v.Bool()
  	case reflect.String:
  		return Atob(v.String())
  	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
  		return v.Int() != 0
  	case reflect.Float32, reflect.Float64:
  		return v.Float() != 0.0
  	case reflect.Complex64, reflect.Complex128:
  		return v.Complex() != 0.0
  	case reflect.Array, reflect.Map, reflect.Slice:
  		return v.Len() != 0
  	}
  
  	// Return true by default
  	return true
  }
docs: // ToBool method converts/assert value into true or false. Default is true.
  // When converting to boolean, the following values are considered FALSE:
  // - The integer value is 0 (zero)
  // - The float value 0.0 (zero)
  // - The complex value 0.0 (zero)
  // - For string value, please refer `revel.Atob` method
  // - An array, map, slice with zero elements
  // - Boolean value returned as-is
  // - "nil" value