Lab Cursor like stages - Argument to $size must be an array

Chapter 2: Basic Aggregation - Utility Stages

Lab: Using Cursor-like Stages

I’ve defined below variable -
var favorites = ["Sandra Bullock","Tom Hanks","Julia Roberts","Kevin Spacey","George Clooney"];

And below stage in pipeline

  {
	$addFields: {
		"favs" : {
			$size : {
				$setIntersection: [
					"$favorites",
					"$cast"
				]
			}
		}
	}
  },

But getting this error
"errmsg" : "The argument to $size must be an array, but was of type: null.

I’m really tired of this.

SOLVED.

used favorites insead of $favorites