Please, extract this to a function with meaning such like `isChecking(e)`.