convert values correctly to python or rdflib term