private function getGlobal(string $global, string $name)
    {
        if (!isset($GLOBALS[$global]) // Global does not exist
            || !is_array($GLOBALS[$global]) // Global is not an array
            || ($name && !isset($GLOBALS[$global][$name])) // Global variable does not exist
        ) {
            return null;
        }
        if (!$name) {
            return $GLOBALS[$global]; // return entire Global array
        }

        return $GLOBALS[$global][$name]; // return requested Global variable
    }