List a collection of webcorners
Just cleaned up your method a little: (Guard condition, better variable name, less nesting)

public function getStuff($brand)
{
    if(!$this-&gt;getWebcorners()) return false;
    $fallback=false;
    foreach ($this-&gt;getWebcorners() as $webcorner) {
        if(strtolower($webcorner-&gt;getBrand()-&gt;getName())== $brand) return $webcorner;
        if($webcorner-&gt;getBrandId()==NULL) $fallback=$webcorner;
    }
    return $fallback;
}


If you want to return the first item without a brand you have to add the $fallback==false condition to your second if. Otherwise you use the last suitable item.