added null check for view.Subviews in ResignFirstResponders to fix crash