Refactor: If statement improvement.