fix KryoSerializer NPE.