Hi, I have found also another case where Psalm thinks that in the example the $existing variable does not contain null s.
https://psalm.dev/r/74b5ec5ba5
But it could be null in case $foo is 1 and $bar is null. It looks like Psalm does not recognize the elseif and thinks that there is a standalone if which would indeed remove the null type.
Maybe this is also related to #7099