Where an answer fails to tender an issue, or otherwise admits the material allegations of the adverse party’s pleading, the court may, on motion of that party, direct judgment on such pleading. However, in actions for declaration of nullity or annulment of marriage or for legal separation, the material facts alleged in the complaint shall always be proved.