How could these events happen on deserialization? Wouldn't the string representation not be null from Akka? So write should never get a null, right?

Also, can you suggest a better way to serialize ActorRef?