We explicitly set `db` to `null` earlier, so this check is correct.