func boolToGo(term *ast.Terminal) (bool, error) { if term.BoolValue == nil { return false, &ErrWrongType{"bool", term.String()} } return term.GetBoolValue(), nil }