Setting nil value for resource attribute makes it nil

Rather than null. Change in behaviour. Tests adjusted.