public function stringToStream(string $input): StreamInterface
    {
        /** @var StreamInterface|null $stream */
        $stream = stream_for($input);
        if (!($stream instanceof StreamInterface)) {
            throw new \TypeError('Could not convert string to a stream');
        }
        return $stream;
    }