a few lines above you already used `$this->transport->getSpool()` therefore `$this->transport` cannot be `null` here. either move this condition before the call to `$this->transport->getSpool()` or remove it completly.