public function setHostname($hostname)
    {
        if (!is_null($hostname) && !is_string($hostname)) {
            $argumentType = (is_object($hostname)) ? get_class($hostname) : gettype($hostname);
            throw new \InvalidArgumentException('Expected hostname as string; got ' . $argumentType);