Fix NULL test in _testinternalcapi (GH-92861)

(cherry picked from commit 702e0da000bf28aa20cb7f3893b575d977506495)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
1 file changed