Revert "Corrected check for nullptr Fixes T25036"
This reverts commit 801e1c0230e7295516577db68035860985aa6861.