Nested case class conversion with nice error messages.

Fixes #58
Review by @gzm0 @hubertp

Why do you actually pattern match here. It just seems that this should be an if/elseif/else