*Just Suggestion*

Using boolean flag for this specific purpose would be far better solution.