unify common.is_*_dtype type extraction