Fixed Search API

It would fail when receiving empty strings as name and brand.