Adds extra check to keyboardWillAppear & keyboardWillDisappear to make sure the view is currently created and visible before acting.