Bug 1009358 - Choose search engine

if (!data) {
  return;
}

Let's do an early return to avoid too much {} nesting.