make two classes public
reorder type check in GetSerializer to make dictionary serialization work