Not sure what does this function do. Is this for checking if the current selection is the last one? If so, suggest to change the name to `isLastOptionSelected`.