link: extract keg-only check into a helper method