How To Handle Null Pointer Exception In Java Using Sockets