Bugfix for crashes when  NetworkInfo is null.