Ah good point.
One issue though is that some couch objects/classes don't have a `domain` property. (Webusers for example uses `domain_membership` to track domains, and some other couch classes that could potentially make use of this function aren't tied to domains at all.)

I could make a separate equivalent function for couch classes that definitely have a `domain` property