looks like there might be a more light-weighted and direct variant to condition the ValueError below ...