Improve the code in the PDataType.