function typeOf(value) {
  if (value === undefined) return 'undefined'
  if (value === null) return 'null'
  return value.constructor.name
}
Returns the constructor name of any value.
@param {any} value
@returns string