Can this be done more concisely with:

```
return isString(val) ?
           (isFinite(val) ? parseFloat(val) : val) :
           defaultVal;
```

*If it is a string and finite number (isFinite parses strings and returns false for NaN) then return the parsed number. Also isFinite is more choosy - for instance parseFloat will return 9 for "9/3", whereas isFinite will return false*