protected function assertRequestTarget($requestTarget)
    {
        if (!is_string($requestTarget)) {
            $type = (is_object($requestTarget) ? get_class($requestTarget) . ' ' : '') . gettype($requestTarget);
            throw new \InvalidArgumentException("Request target should be a string, not a $type");
        }
    }