Reducing fireflies via node setup - question how to put lightpath in

for reducing fireflies I am updating all used materials in my latest scene. To get rid of them I use a lightpath node with “is difuse ray” attached to the factor input of a mix shader for every glossy shader in use. This looks like this:

for the most materials this works fine. But what if I need to attach a fresnel node to the factor input of the mix shader?
Can I just combine a fresnel node with the lightpath node via a math node set to add? Quick test render shows that this is not working.
Or in case I like to set the factor of the mix shader to a certain value?

how to you implement the lightpath node into more complex materials?