Validate ``value`` and then use the document's class to wrap the
            value

def wrap(self, value):
        ''' Validate ``value`` and then use the document's class to wrap the
            value'''
        self.validate_wrap(value)
        return self.type.wrap(value)