Fixing BUG when trying to set nil value for primitive attributes