Added support for numeric type heirachies and type casting