How to conditional filtering

I’m trying to get a filter set up for my collection so that if branch == variable this works right, but if the variable is empty no data is returned. Is there a way to return all data if the filter is empty?