allow both direction casts of "generic of" type