Biblatex already checks if the bibliography is empty and does not print the heading in this case.
So instead of replicating the checks for an empty bibliography, which biblatex performs anyway to print this warning, you could just disable the warning.
```
\documentclass{book}
\usepackage[%
refsegment=chapter,% Pour avoir une bib per chap
bibencoding=inputenc,
hyperref=auto,
style=authoryear,
giveninits=true,
citestyle=alphabetic,
sorting=nyt,
sortcites=true,
doi=false,
isbn=false,
url=false,
eprint=false,
autopunct=true,
maxnames=10,%
maxalphanames=3,%
hyperref=true,
abbreviate=false,
backref=true,
backend=biber%
]{biblatex}
\usepackage{hyperref}
\addbibresource{biblatex-examples.bib}
\renewbibmacro*{finentry}{\printfield{abstract}\finentry}
\usepackage{xpatch}
\xpretocmd{\chapter}{%
\ifnum\value{chapter}>0
\printbibliography[segment=\therefsegment,heading=subbibliography]
\fi%
}{}{}
\makeatletter
\def\blx@warn@bibempty{%
% \@latex@warning{Empty bibliography}
}
\makeatother
\begin{document}
\chapter{First chapter}
\cite{padhye}.
\chapter{Second chapter}
\cite{kastenholz}, \cite{itzhaki}.
\chapter{Second chapter}
no here
\chapter*{Bibliographie}
\addcontentsline{toc}{chapter}{Bibliographie}
\renewbibmacro*{finentry}{\finentry}
\printbibliography[heading=none]
\end{document}
```
This works similarly for subbibliographies filtered by type:
```
\documentclass{book}
\usepackage[%
refsegment=chapter,% Pour avoir une bib per chap
bibencoding=inputenc,
hyperref=auto,
style=authoryear,
giveninits=true,
citestyle=alphabetic,
sorting=nyt,
sortcites=true,
doi=false,
isbn=false,
url=false,
eprint=false,
autopunct=true,
maxnames=10,%
maxalphanames=3,%
hyperref=true,
abbreviate=false,
backref=true,
backend=biber%
]{biblatex}
\usepackage{hyperref}
\addbibresource{biblatex-examples.bib}
\makeatletter
\def\blx@warn@bibempty{%
% \@latex@warning{Empty bibliography}
}
\def\blx@key@type#1{%
\ifcsundef{blx@type@\the\c@refsection @#1}
{%\blx@warning{Type '#1' not found}%
\let\blx@tempa\@empty}
{\blx@printbibchecks
\iftoggle{blx@tempb}
{\togglefalse{blx@tempb}%
\blx@filter\blx@tempa{blx@type@\the\c@refsection @#1}}
{\let\blx@tempa\@empty
\blx@error
{'type' used multiple times}
{When passing multiple filter options, each entry\MessageBreak
must satisfy all conditions (AND conjunction),\MessageBreak
hence some options may not be used twice.\MessageBreak
Use 'filter' and '\string\defbibfilter' with OR conjunctions}}}}
\makeatother
\begin{document}
\tableofcontents
\cite{aksin}
\chapter*{Bibliographie}
\addcontentsline{toc}{chapter}{Bibliographie}
\phantomsection
\addcontentsline{toc}{section}{Books}
\printbibliography[heading=subbibliography,title={Books},type=book]
\phantomsection
\addcontentsline{toc}{section}{Articles}
\printbibliography[heading=subbibliography,title={Articles},type=article]
\end{document}
```