check when tab exist or not in 2.5

Previously I used _getTabById(pgID) to check if a tab already existed.



This function is gone in 2.5. How can I check for existing tabs?



if (tabbar._tabs[id]) alert(“tab exists”);