I would suggest to do this check before adding the idle observer.