Serena Williams has admitted she was worried about her tennis career when she first discovered she was pregnant.