Fix problem with Null object and getAsMsg in DefaultMsgSerializer