Data type conversion and validation