Quote:
So How do I determine that there is ad from google or not?
There is a setting in AdSense that lets you automatically hide the ad container if no ad is loaded.
I would recommend not messing around with the ad containers, as they mostly go against their terms or service and policies.
But again, you need to check how to do that from AdSense, and avoid tampering the scripts.