Better check to not add where clause if value is an empty array.