Utility for checking whether the device has an internet connection.