Use either Thread#isAlive()
if (Thread.currentThread().isAlive())
JavaDoc says:
Tests if this thread is alive. A thread is alive if it has been started and has not yet died.
Or, use Thread#getState() as
Thread.State currState = Thread.currentThread().getState();
if (currState != Thread.State.NEW && currState != Thread.State.TERMINATED)
JavaDoc says:
Returns the state of this thread. This method is designed for use in monitoring of the system state, not for synchronization control.