protected function renderBody()
    {
        if (is_scalar($this->payload) || $this->payload === null) {
            return (string)$this->payload;
        }

        if ($this->payload instanceof Stringable) {
            return $this->payload->toString();
        }

        if (is_object($this->payload) && method_exists($this->payload, '__toString')) {
            return (string)$this->payload;
        }

        if (!$this->serializer) {
            throw new UnConfiguredException('No serializer assigned, cannot build the body.');
        }

        return $this->serializer->serialize($this->payload);

    }