Determine if change originated from UI for NativeSelect ValueChangeEvent

I have a few situations where I am using NativeSelect components with ValueChangeListeners. I often want 2 separate code paths in the ValueChangeListener. 1 path if the value change came from the user interface and another if the change came from the backend code. Currently I just bracket the NativeSelect.setValue with set/unset of a variable that the listener checks to determine which path to take.

This seems like it would be common pattern, I am just wondering if there is already some built in methods of handling this that are more elegant?