Reject all() / race() / any() / some() / map() / reduce() when called with a non-array.
all(null)
->otherwise(function(\InvalidArgumentException $e) {
assertEquals('Expecting an array or a promise which resolves to an array, got NULL instead.' , $exception->getMessage());
});