Method Directive Error when trying to enable post-process

I am able to save the new directive if it is not enabled. When I enable it and try to save I am getting the below error. I have not received this error before so any help would be appreciated.

It sounds like you’re trying to iterate over a variable that was declared as a nullable type? I say that with a question mark because I still struggle at reading the errors. But I have run in to some that don’t show up until I go to enable it. There’s something in the code that it doesn’t like.

I’d double check any foreach statements.