value to check
true if value is a primitive type
isPrimitive(null) // true
isPrimitive(undefined) // true
isPrimitive('string') // true
isPrimitive(1) // true
isPrimitive(true) // true
isPrimitive(Symbol('symbol')) // true
isPrimitive(new Date()) // false
isPrimitive(new RegExp('')) // false
isPrimitive(new Error('')) // false
isPrimitive(new Set()) // false
isPrimitive(new Map()) // false
isPrimitive(new Array()) // true
isPrimitive(new Object()) // true
Checks if value is a primitive type.