function _hasValidCallbackArg(shim, args, specCallback) {
  if (shim.isNumber(specCallback)) {
    const cbIdx = normalizeIndex(args.length, specCallback)
    if (cbIdx === null) {
      return false
    }

    const callback = args[cbIdx]
    return shim.isFunction(callback)
  }

  return true
}
Check if the argument defined as callback is an actual function

@private
@param {Shim} shim An instance of the shim class
@param {Array} args The arguments to the wrapped function
@param {Function} specCallback Optional callback argument received from the spec
@returns {boolean} Whether the spec ha a valid callback argument