app/testpmd: fix dereference before null check