Conversion from one object type to another with a bit of black magic.