code: function parseToZeroOrNumber(value, toFloat) {
                      var num = toFloat ? parseFloat(value) : parseInt(value, 10);
                      return isNaN(num) ? 0 : num;
                  }
docs: Returns Zero or the number to which the value can be parsed.
  @param value The value which shall be parsed.
  @param toFloat Indicates whether the number shall be parsed to a float.