Data validation & conversion for Python