Move 3.10-specific type casting calls to correct file.