Hello. I have been looking for something like this too, and after about 2 hours of searching google and trial and error I think I have found the solution.
if ( get(‘field_name’,TRUE) ) {
do this ;
} else {
do something different ;
}
So in your case you want to write:
if ( get_group(‘testimonials’,TRUE) ) {
I hope this helps.