Convert and map between objects and simple types