Add check for null response from server