Answer
Rather than expressing a null-check directly in the gateway's own condition syntax, compute the check in a script task just before the gateway instead — set a simple boolean variable (like isValid) there based on whatever null/value logic you actually need, then use that plain boolean as the gateway's condition. Null-comparison expressions inside gateway conditions have been unreliable in practice, while a boolean computed explicitly in a script task behaves predictably and also makes more complex validation logic easier to build and read.