Fixed null pointer exception in some json parsing

This issue also breaks one test case in ScalaObjectMapperTest