Clicking UI also selects 3D objects behind it

I’ve done the research and everyone says: Perform an “if” check on this function

if(UnityEngine.EventSystems.EventSystem.current.IsPointerOverGameObject())
{
 //UI is selected
return;
}

My issue is that I will have near a hundred components with behavior files calling OnMouseDown, OnMouseDrag, and OnMouseUp. Do I really have to perform this if check at the beginning of every Mouse function call on Non-UI components or is there a much simpler way that I am missing?

You could switch your input system entirely to the new Unity EventSystem than click trough is prevented by the system internally. Check here:
http://docs.unity3d.com/Manual/EventSystem.html

But that is even more work than putting the if statement.

May be a pain up front but this looks like the right solution. Thank you!