Added a safety check for gameObject.renderer