The actual correct answer is to add a @Contract annotation to the method checking for null.
@Contract
See: https://blog.jetbrains.com/idea/2013/10/better-control-flow-analysis-with-contract-annotations-and-intellij-idea-13/
Credits: How can I make IntelliJ IDEA understand my null-checking method?