Check property exists if object used in template such as $stdClass->property