Changing popover check to a ternary.