core/lwip: Fix NULL pointer check

Signed-off-by: Gene Cumm <gene.cumm@gmail.com>