Fix potential NPE
Nulls are bad - if we try to set a null property, we remove it instead.