Check network before making request