Is there a relay to digitally check if mains is available
Yes. You can use a mains relay and use a contact of it to indicate that mains is present. 







simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. Mains present indication. Enable the GPIO pin internal pull-up resistor.

There are other ways using opto-isolators, etc., but since you are already using relays it makes sense to use another. The isolated or "volt-free" contact provides isolation to prevent mains getting near your Pi. The relay coil should be AC type with voltage selected to suit your mains voltage.