Simplify check to avoid error in MS