some tweak to when and how we do type unsafe things. Let the serialize key do the casting, and also convert serialkey types to two helpful enums so we don't have to do a bunch of class compares at runtime (moves to startup time since keys should be declare statically)