check network connectivity before trying to load tweets