You can cook the spinach before adding it to the mac and cheese to ensure that it's fully wilted and won't release too much moisture into the dish. You can sauté it in a little bit of olive oil or steam it until wilted. I do not cook the spinach before adding it to the mac and cheese because it's chopped finely and wilts as it bakes.