Update StackFrameItem.cs

we check if the method.DeclaringType is not null to solve the annoying Exception message