Decode null to pointers properly

* When decoding a null to a pointer value, it should be nil