Moving _get_datatype to the attribute which values have access to