How can i ommit an condition in Entity Field Query if variable do not exist, for example
->fieldCondition('field_filter_color', 'tid', $filter_color)
Recieves in $filter_color one term id. But there are situations where $filter_color is not present, so i would like to do: if $filter_color is empty, ignore this condition.
Alternative is to present it as an array like
->fieldCondition('field_filter_color', 'tid', $filter_color, 'IN')
and prepopulate all values in $filter_color, and if $filter_color is chosen, create array with only one value, but i am not sure it is best way to do it.