Implemented basic CastType that uses "cast" functions to convert from one type to the other