Fixed things s.t. ReferenceTests work

Major part of this is the fact that PSobject isn't allowed to wrap null in PS, but instead the PSObject object is directly null.
This is just the otheer way round it was supposed until now.
Fixed various places s.t. it works as expected.