These two if's are exclusive, and could be nested like this:
```
if (is_numeric($city_id))
{
   if ($city_id == 0)
   {
      $conditions .= ' j.city_id IS NULL and';
   }
   else
   {
      $conditions .= ' j.city_id = ' .$city_id . ' and';
   }
}
```