add null judge and add http timeout