wm-tester: correct NULL pointer check