fixes #10

fixes #10 where we entered an infinite loop by trying to serialize an
object having fields of primite types like `String`.