If $null on the right side - the first two expressions return 'false' both. But, when null on the left side (last two expressions) - I've got 'false' and 'true'.
May somebody to explain in details this behavior ?
In other words, when $null on the left side the -eq or -ne operators will cause the expression to evaluate to True or False, whereas when $null is on the right side the expression will evaluate to $null or True or False. When the expression evaluates to $null, the ‘else’ branch of the ‘if’ statement is invoked.