fold entity.check_ids_for logic into method