Trigger on flow variable?

Is it possible to trigger on a flow variable?

I have a fairly complex sequence where a variable sometimes becomes NaN.
And this makes it break because this variable is needed in the rest of the sequence, so I need to change this variable to a float value if it by some reason that I don’t understand becomes NaN.

Is there any trigger nodes that can trigger on flow variables becoming NaN?

I am not aware of a direct node that triggers on a variable. BUT, i have the same case and I just publish the variable in MQTT and then use the MQTT Message as the Trigger. This works very well. Maybe this can be a workaround for your usecase as well.