Updated setter method to assert that ivar is nil.