It’s correct behaviour as far as I know, you just can’t append things that aren’t the correct type. You should get an error at runtime, but it won’t stop the game so you might have missed it?
Also, you can append null, even if it’s from a variable with the wrong type, so if maybe $pathX\PathFollow2DX, is null because it’s not ready yet, then it will be appended (as null)