app/test: fix missing NULL pointer checks