Wellllllllll... yes. If you go as far as also installing APILogic and MathOps (also metascripts), you can use an {&if...} check to see if something is at least a number: {&if NaN!={&math max(@(selected.tooltip))}} ...true case here... {&else} ... false case here... {&end} Note we're checking if the value of the tooltip evaluates as 'NaN' (not a number), so we are negating that to make our "true" case be that the tooltip is a number. Which you could use to hide the api handle of your token-mod command: !{&if NaN!={&math max(@(selected.tooltip))}}token-mod --set tooltip|[\][\]@(selected.tooltip)+3\]\]{&end} If the logical test fails, the token-mod command is dropped from the line and nothing happens. In this example, we don't need an {&else} case, but if you just want to get a message alerting you to the fact that the tooltip is not a number, you can put that in the {&else} case: !{&if NaN!={&math max(@(selected.tooltip))}}token-mod --set tooltip|[\][\]@(selected.tooltip)+3\]\]{&else}/w gm The tooltip for that character is not a number. It currently reads: @(selected.tooltip){&simple}{&end} Alternatively, you could use the logical test to select the value to use: ! token-mod --set tooltip| [\][\] {&if NaN!={&math max(@(selected.tooltip))}} @(selected.tooltip){&else}0{&end}+3\]\] That would use a default value of '0' if the tooltip was not a number. You could, of course, sub something else in there, like a check of an attribute on some character sheet. As for specifically detecting an integer (rather than just a number)... ...you can approach that with your IF block also testing whether there is a '.' in the text (change to ',' depending on your local settings): {&if NaN != @(selected.tooltip) && '@(selected.tooltip)` !~ .} That will trigger the false case for something like "3.2", but pass for something like "3". That doesn't get you all the way there, since "1.0" should evaluate as an integer, but it would be caught by that IF check. In a similar vein, though, your {&math} block can utilize the floor() function if you want to flatten a number to its integer value... and since it also returns 'NaN' if the supplied value is not a number, you could effectively replace the max() function from above. This would then bypass the need for the check for a decimal character, since you would have removed it in the conversion to an integer (or a NaN): {&math floor(@(selected.tooltip))}