Avoid NullPointerException in CustomObjectSerializerImpl
Merge pull request #241 from henrik242/avoid-nullpointer

Avoid NullPointerException in CustomObjectSerializerImpl