No decree of divorce shall affect the legitimacy of a child born or begotten in lawful matrimony, unless it shall be so expressed in the decree, and children born of a marriage entered into in good faith by the parties thereto shall be regarded as legitimate children and their legitimacy shall not be affected by a decree of nullity, unless it shall be so expressed in the decree.