Determines if the device is able to access the internet.
Return true if the device can access the internet. Else, return false.