Converted multimethod to protocol for performance reasons and added code to recursively stringify ObjectIds (for, say, JSON encoding)