The most obvious reason is because there are no items in the collection.
Use the debugger: put a breakpoint on the line
foreach (string status in targetStatus)
And run your code in the debugger. When it reaches the line, it will stop and hand control to you. You can then examine variable contents, single step lines, and so forth.
If it is an empty collection, then it's up to you to find out why: put another breakpoin on the line
List<string> targetStatus = properties.GetTargetStatus();
And run your code in the debugger again. This time, when it reaches the line step into the method and follow closely what happens there.