HA master promotion: avoid NPE if no valid masters