handle vocab factories that are functions rather than classes