Serialize the type check cache correctly.