a function that checks if a value matches the expected type
const ensureArr = ensure(isArr, 'Value is not an array')
const arr = ensureArr(123) // throws an error
const arr2 = ensureArr([1, 2, 3]) // returns [1, 2, 3]
Optional
errorMsg: stringGenerated using TypeDoc
Determines if a value is a number.