is_number

Test if a value is a number (integer or floating point):

{% if 1|is_number %}Yes, this is a number{% endif %}

Edit on GitHub