raw/cnxk_gpio: check pointer before use in self test