Call isSelected as a function