Prevent crash when network interface is uninitialized

ifa->ifa_addr may be NULL although ifa is not. Prevent
null pointer exception by checking for this.