talked this over with @jeremy . He suggested to create a type map to perform the conversion:

```ruby
TYPE_CASTS.fetch(value) { value.to_f };  TYPE_CASTS = { nil => nil, ‘Infinity’ => Float::INFINITY, … }
```