Avoid Annoying NullReferenceException

When iterating over stack call we get an exception at StackFrame.cs
Making the above change seems to solve the problem.