Use isAttached and isRemoving before checking in text watcher