Added null check to HttpHandler.handle