Added conditionals around the check for cf.tenants