<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, form, extra_validators=tuple()):
        '''Perform validation only if data has been submitted'''
        if not self.has_data:
            return True
        if self.is_list_data:
            if not isinstance(self._formdata[self.name], (list, tuple)):
                return False
        return super(NestedModelList, self).validate(form, extra_validators)