if { [string is double -strict $varname] } then { ... }