You should first check if `$this->routes[$uri]` exists and then have the other conditions depending on it, i.e.:

    if (isset($this->routes[$uri]))
    {
        if (is_string($this->routes[$uri]))
        {
            // regular route code
        }
        elseif (is_array($this->routes[$uri]) && isset($this->routes[$uri][$http_verb]))
        {
            // verb route code
        }
        ...
    }