Need to check a type of variable in ampscript, in order to use FormatNumber function(that can only work with integer variables). I tried the Handlebars function {{isString()}}, but can't make it worked with AmpScript or GTL, in code snippet block
SET @X = TreatAsContent('{{=isString(TrackingNumber )}}')
If @X == False THEN
set @TrackingNumber = TreatAsContent('{{=FormatNumber(TrackingNumber, "d6")}}')
Else
set @TrackingNumber = TreatAsContent('{{TrackingNumber}}') EndIF