Every detailed report helps when tracking down problems. If you could share the save file with this error, either here or on Discord it would help with understanding how it happened.
I can give a quick breakdown what the error message means, though it seems you figured out parts of it. "babyage" is the function where the error occured. "Invalid set index 'name'" means that it tried to find the contents of a variable named 'name' but that variable did not exist. "(on base: 'Nil')" means that the object that it tried to search for the variable didn't exist. "with value of type 'String'." means that it tried to replace the contents of the variable with text.
To sum it up, it failed for the same core reason as above. The function assumed that it would be given a baby's data, but when it tried to use that data it found out that it didn't actually exist. It's a bit like a student going to school, but not bringing the assignment to turn in. Now we are trying to figure out whether that student did the assignment but forgot to bring it to class, did the assignment but the dog ate it, or never did the assignment.
Edit: minor inclusions