Checks for Internet connection.