<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate(self, value):
 """Make sure that value is of the right type """

        if not isinstance(value, self.nested_klass):
            self.raise_error('NestedClass is of the wrong type: {0} vs expected {1}'
                             .format(value.__class__.__name__, self.nested_klass.__name__))
        super(NestedDocumentField, self).validate(value)