Replaced utils.isFunction to typeof === 'function'