Check isMounted() before setting state within a timeout