Fix for number filter checking for numbers

Fix for number filter when passing not a number to a filter. isNaN is
broken, so we should use isNumber function in formatNumber function.
Close #6188