# \[BUG\] 8.1.0rc3 Numeric expression on string returns 0 instead of failover

**URL:** <https://forum.inductiveautomation.com/t/bug-8-1-0rc3-numeric-expression-on-string-returns-0-instead-of-failover/40170>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [October 30, 2020, 1:22pm UTC](https://forum.inductiveautomation.com/t/bug-8-1-0rc3-numeric-expression-on-string-returns-0-instead-of-failover/40170 "2020-10-30T13:22:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 30, 2020, 1:22pm UTC](https://forum.inductiveautomation.com/t/bug-8-1-0rc3-numeric-expression-on-string-returns-0-instead-of-failover/40170/1 "2020-10-30T13:22:38Z")

</div>

I’m trying to use `toInt({value}, -999999)` to check if the value is a string or a number, however the expression returns “0” even if the value is a string like “off”.

Is there any other way that I can check this?

---

<div class="post-metadata">

**Author:** ![iscrac](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/iscrac/32/49757_2.png) [@iscrac](https://forum.inductiveautomation.com/u/iscrac)\
**Post date:** [October 30, 2020, 1:31pm UTC](https://forum.inductiveautomation.com/t/bug-8-1-0rc3-numeric-expression-on-string-returns-0-instead-of-failover/40170/2 "2020-10-30T13:31:59Z")

</div>

maybe use the

```auto
try( toInt({value}, -999999),{value})

```

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [October 30, 2020, 2:10pm UTC](https://forum.inductiveautomation.com/t/bug-8-1-0rc3-numeric-expression-on-string-returns-0-instead-of-failover/40170/3 "2020-10-30T14:10:55Z")

</div>

Definitely a bug.  
It is evaluating the text as literals. Just tested this on 7.9.16 as well.  
If you have off or on or true or false as the text it will evaluate it as 0,1,1,0
