Change it to variant and it'll work for both strings and integer. In fact you can print datatypes except arrays, UDT's and objects.