Walking a cemetery to obtain family names and information is not with out it's danger. Well tended cemeteries in town or next to churches have little harm to them, but rural untamed cemeteries may be another matter. Usually I stay out of those cemeteries in the summer due to over grown foliage, snakes, creature etc. Better to leave them to the fall or winter.
Try to always travel in two's or more when you visit the more isolated cemeteries. Even in town and next to churches individuals may accost you. Keep an eye on your vehicle as it may be robbed while you are far afield in a cemetery. Use a little common sense for your protection.
When walking around the more overgrown cemeteries tread gently. Not only the risk of a vault top giving way is present (small creatures bury into the graves weaking the vaults) but some old graveyards would have a shallow water well for visitors to draw water for flowers for the graves or to clean tombstones. Those wells may be open or they may be covered with a board that when stepped on will break.