Check isLoading() before changing state