Refactoring default SerializerProvider's handling of root null values