title: powershell logical operators and $Error variable
body: <p>Recently I had to check whether some errors occurred when my script is executed. First I've tried to check whether $Error is $null. The strange thing for me was that I haven't got any result from (neither True, nor False). Then i've wrote:</p>
  
  <pre><code>if (($error -eq $null) -or ($error -ne $null)) {Write-Host "NULL"}
  </code></pre>
  
  <p>And nothing was in the output. This made me very confused. I've found that such thing happens for all variables which are of System.Collections.ArrayList type.</p>
  
  <p>Maybe someone knows the explanation why this happens, because for me this looks like a bug?</p>
  
  <p>Version of Powershell, on which I found this, is 3.0.</p>