Avoid referencing nonexistent AgencyId vars