Adding support for automatic inherited type conversion