Kevin Marquette goes into great detail on Powershell’s $nullconcept:
When a
$nullvalue is used in a numeric equation then your results will be invalid if they don’t give an error. Sometimes the$nullwill evaluate to0and other times it will make the whole result$null. Here is an example with multiplication that gives 0 or$nulldepending on the order of the values.
Nulls are tricky to handle in any language, making their nuances important to understand.