private function checkVariableExists($variable, $type)
    {
        if (($type === 'env'         && !getenv($variable)) ||
            ($type === 'replacement' && !$this->rstore->arrayKeyExists($variable)) ||
            ($type === 'variable'    && !$this->vstore->arrayKeyExists($variable))
        ) {
            throw new \InvalidArgumentException(
                sprintf('Variable has not been defined as a `%s`: %s', $variable, $type)
            );
        }

        return true;
    }