Simplify nullptr check.