\documentclass{book}
\usepackage{xparse,l3regex,chngcntr}
\ExplSyntaxOn
\NewDocumentCommand{\CounterIsInResetListTF}{mmmm}
{
\regex_match:nvTF { \b #1 \b } { cl@#2 } { #3 } { #4 }
}
\cs_generate_variant:Nn \regex_match:nnTF { nv }
\ExplSyntaxOff
\begin{document}
\CounterIsInResetListTF{section}{chapter}{IS}{IS NOT}
\CounterIsInResetListTF{subsection}{chapter}{IS}{IS NOT}
\counterwithin{subsection}{chapter}
\CounterIsInResetListTF{subsection}{chapter}{IS}{IS NOT}
\counterwithout{section}{chapter}