When you assign null to the variable you’re telling the compiler to back off because you know better than him so he should not complain about this.
This is probably due to the fact that assigning null is considered to imply an explicit action by the developer.