print the object type in an effort to debug #307

Add some additional output to understand what type of object is being passed to the json encoder when it's not a vm type. This should hopefully help to get more info for issue #307 .

@mhpx could you test this?