<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_valid(self, value):
 """Validate value before actual instance setting based on type. Args: value (object):
 The value object for validation. Returns: True if value validation succeeds else False. """

        if not self.is_array:
            return self._valid(value)

        if isinstance(value, (list, set, tuple)):
            return all([self._valid(item) for item in value])

        return self._valid(value)