Remove facets param from query if is empty array

I need this if I remove all facets with `$query->setFacets(array());`