remove redundant check for self.shell is None