I'm trying to display 'n/a' instead of NaN in a popup. Something like:
{% if value == NaN %}
n/a
{% endif %}
I realize I can always catch it earlier on before the template is rendered but
Is there was a way to check for NaN values in the template?
Here is the logic for a custom filter since there is not a built in filter to check for NaN:
Then the usage is the same as for any filter: