Validate before mutation, return current representative after duplicate replacement."
(check-type value string) (check-type datatype string)
;; TMDM 4.4/5.6: datatype is a locator, never a Topic or a whitelist.
(unless (absolute-locator-p datatype)
(occurrence-problem :invalid-datatype "Datatype must be a resolved absolute locator."))
Validate before mutation, return current representative after duplicate replacement."
(check-type value string) (check-type datatype string)
;; TMDM 4.4/5.6: datatype is a locator, never a Topic or a whitelist.
(unless (absolute-locator-p datatype)
(occurrence-problem :invalid-datatype "Datatype must be a resolved absolute locator."))