Refactored isPopupOpen method