// IsUnknownOrError returns whether the input element ref.Val is an ErrType or UnknownType. func IsUnknownOrError(val ref.Val) bool { … } // IsPrimitiveType returns whether the input element ref.Val is a primitive type. // Note, primitive types do not include well-known types such as Duration and Timestamp. func IsPrimitiveType(val ref.Val) bool { … } // Equal returns whether the two ref.Value are heterogeneously equivalent. func Equal(lhs ref.Val, rhs ref.Val) ref.Val { … }