pub fn to_bool(arg: &Value) -> Result<bool, String>
Convert arg to a bool and do some error checks (without casting)