Do not index nil values

nil values shouldn't be indexed by default. You should call explicitly ``value.to_f`` if you want that behaviour.