Adding kryo serializers for types.