just use `if (!ThreadUI.input.value)`

(btw we can use `this` too, right ?)