We know that ISIS started invading Iraq shortly after the American troops left, so they were clearly a deterrent.
Regarding Syria, both Obama and Romney were for arming the rebels, but I think it would have been better to have turned Assad into an ally. That's not a popular position, but there's a lot more religious freedom under Assad than under ISIS. Assad's army was well-organized, but turned out to be no match for ISIS plus the rebels. Too thinned out, plus it seems that ISIS is more highly motivated and more sociopathic in its tactics since it is willing to murder anyone. Even Assad's army wouldn't go that far, plus his army includes Christians from the large Assyrian population. So that's my take on it.