tests: Remove unnecessary non-NULL test

It was confusing Coverity.

Coverity issue: #74584