How to find if an object is empty of not in PHP.
http://stackoverflow.com/questions/9412126/how-to-check-if-an-object-is-empty-in-php