* Refactor spec serialization so that native types are evaluated last. * Remove redundant type checks Fixes #30818