catch null pointer exception in network test