if (fn == null) throw new Error('fn parameter is mandatory')
if (typeof fn !== 'function') {
throw new TypeError('fn parameter is not a function')
}
if (fn == null) throw new Error('fn parameter is mandatory')
if (typeof fn !== 'function') {
throw new TypeError('fn parameter is not a function')
}