Check serverSocket for null first before entering try/catch block
Signed-off-by: Dmitriy Pavlenko <dmitriy.pavlenko@sysgears.com>