Create a getModalElement helper method to remove duplication with isShowingModal method?