esp_netif:optimize the null pointer judgment of eb Closes IDF-4576 See merge request espressif/esp-idf!16934