Add some support for automatic type conversion