<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def value(self, value):
 """Change of parameter value. If an error occured, it is stored in this error attribute. :param value: new value to use. If input value is not an instance of self.ptype, self error :raises: TypeError if input value is not an instance of self ptype. """


        if value is None or (
                self.ptype is None or isinstance(value, self.ptype)
        ):
            self._value = value

        else:
            # raise wrong type error
            error = TypeError(
                'Wrong value type of {0} ({1}). {2} expected.'.format(
                    self.name, value, self.ptype
                )
            )
            self._error = error
            raise error