Can this be combined with the nested conditional `if (feature.popup !== null && feature.popup.visible()) {`