Maybe this could work better:
```ruby
numeric_value = Float(value) rescue nil
numeric_value == 0
```