<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def logger(self, logger):
 """Set the logger if is not None, and it is of type Logger."""

        if logger is None or not isinstance(logger, Logger):
            raise ValueError("Logger can not be set to None, and must be of type logging.Logger")

        self._logger = logger