Making return values consistent.
If clause before loop makes more sense.
foreach on separate line.