Switched if with case.