Is it safe to use an Y2 Capacitor where an X capacitor used to be?
Most Y rated caps are also approved for use as X rated caps. Look at the marking on the cap, you should find something like X1Y2, or X1/Y2, which means that it has been approved for use as either a X1 rated or Y2 rated cap.