Perhaps you do not need a condition, but you can use the float() expression to make sure to convert the content AJAX.LastData to a floating number (a number with decimals if needed).
This can be a proper way to set a numeric global variable's value for example :
myVar: set value to float(AJAX.LastData)