It is a Hub Variable under settings. Here is the error.
app:32122022-11-12 07:57:33.690 AMerrorjava.lang.NullPointerException: Cannot get property 'valueAsString' on null object on line 64 (method installed)
Can you share a complete, minimal, non-working snippet?You may find the problem yourself by doing that, too. What you have above should work. My suspicion from your error is that newStatus isn't set to what you think it is at that point (though that obviously shouldn't be the case in what you posted above). You can try adding a line like this right before setting the variable to see:
Well sometimes your brain and your eyes, or at least mine, don't seem to work together. The variable name should have been modeStatus, NOT Modestatus. Dad burned capital letters...