Convert non-string attributes to strings if string type is requested