make sure $batcache is set before checking if it is_object