function parsePrimitives(value) {
  if (value === '') {
    return value
  } else if (value === 'true' || value === '1') {
    value = true
  } else if (value === 'false' || value === '0') {
    value = false
  } else if (value === 'null') {
    value = null
  } else if (value === 'undefined') {
    value = undefined
  } else if (!isNaN(value) && value !== '') {
    value = parseFloat(value)
  }

  return value
}
Parses the string and returns the value of the correct type.

@param {String} value
@returns {*}