I have an approval flow with an optional text input ("Message") at the trigger step.

In order to be able to include the message in an email later on in the flow without the flow failing (in the scenario the field is left blank), I have created a sequence of steps including initializing a variable, adding condition that checks if the message is null and then appending the string variable accordingly:

I then use the variable in my email message body.
This has worked perfectly for 2 approval flows, created late last year, which have been used by my team since January.
Today I tried to create another separate flow with the exact same steps / parameters and it is failing. I can't figure out why. Below is the error message I am getting:

I've gone back and retested the other 2 flows and confirmed everything is still working with these. I've also done a side by side check of the code behind the condition step. There are no differences between the one that works and the one that fails.
Any ideas what is going wrong?