How to determine if combobox value is an option?

I have a combobox that is populated by external data. Is there a way to determine if the value in the combobox equals one of the dropdown options, or if it was custom entered?

I am using this in a search feature, enabling autocomplete for values in our data but also allowing the user to enter their own search criteria. We currently allow the user to enter several words which we then “AND” together. If they select an item from the list, I want to treat it as a phrase search and surround it with quotations.

So after they make their selection, I want to be able to test if their selection was from the dropdown list or not.

The getOptionByLabel method returns option for a certain label if it exists:

var text = combo.getComboText()
var option = combo.getOptionByLabel(text);