Recently an episode of the television show Grey's Anatomy involved child safety . The storyline was about what happened to the character's small son when he pulled on a bookcase and it fell on him. He was seriously injured and he required intensive surgery to repair the damage. Young children often view the lower shelves of bookcases as ladders for climbing, and this can cause the whole shelf to tip over on top of them.
Unfortunately, this reflects reality. It can happen, and it is wise to take precautions. In the TV show, the child gained access to the room with bookshelves when a Baby Gate was left open. It is a good idea to block access to a home library or office with a lot of heavy books and shelves. This can be accomplished with a gate or a child proof door lock. You could use a Door Knob Lock or a Door Top Lock.
Another option when blocking access in not practical such as in a Family or Living Room is to bolt the bookshelves to the wall. Use the Anti-Tip Furniture Strap or a metal bracket and screw into a wall stud for secure anchoring. This can often be done in a manner which visually obscures the anchor. Place at the back of the unit or at the top of a tall bookshelf. More than one will be needed for wide shelves.
Even if the bookshelves are bolted to the wall it is still a good idea to temporarily remove heavy books that may be within baby's reach. You would not want a heavy book to fall on their foot or hand. You might also consider blocking the bookshelves with a large piece of furniture.