Conversion from one object type to another with a bit of black magic
https://github.com/piotrmurach/necromancer