public function stackExists(Image $client, $stackName, $organizationName = '')
    {
        try {
            $stack = $client->getStack($stackName, $organizationName);

            return $stack->getName() == $stackName;
        } catch (ClientException $e) {
            if (404 === $e->getCode()) {
                return false;
            }

            throw $e;
        }
    }