That is something that I should be checking for, yes, but actually the issue is that `w` has a value of `nil`, meaning that the `widgets` array is something like `[widget, frame, widget, nil, widget...]`. That nil shouldn't be there, it doesn't do anything. Seems like the right thing to do would be to take the `widgets` array and remove all `nil` values using the `compact!` method.