Added object existance checks.