There are optocoupler specific for AC, es. sfh620a, but don't know if is useful in this specific case.
Ciao, Ale.