Just another thought: Think about what your customer, a pentester, security or data protection auditor will see. A piece of software trying to communicate with a 3rd party without consent, in this case with the biggest data violator, Google. None of them knows that you're just pinging them. If you want to check internet connectivity than please check this with the hosts you really need.
@Norman Palardy A ping is also not guaranteed to reach the intended host
It can / could be blocked as Tomas already noted
You remind me to the fact, that it not only can be done by the customer but by the site operator aswell in order to reduce the background noise. Try to ping my website jakobssystems.net , you will fail. And in addition to that. For my internal Cloud Host cloud.jakobssystems.de I am blocking any regions with GeoIP filters where I know, that I wont do any business there. Basically everything outside and south and east of Europe. This reduces the attack surface significantly and improves bandwith for my cloud host next to me in my office which is only connected with 20 MBit with the internet.
@John McKernon And yes, I have a web site, but this app may well outlive me (this is its 40th year, my 68th), it would be best if it didn't rely on my web site being available.
Well the possibility that Google will be among us in, let's say, 10-20 years is equal with the chance your site will be there. Just think 20 years back. Do Altavista, Lycos or Yahoo exist - the big search engines of the 90ies? Well Yahoo might still be there but it's more like a zombie, dying a long till really vanished. But you and me are still here, heck we are talking with each other ;-)