Change checking for precision and scale to PDataType.