The test two lines below will fail if `console` is `null`, so personally I'd say we could remove this. But fine to keep it in if you like the explicit non-null check.