Check to see if the connection is established before attempting to get data.