Removed unnecessary if.

Foreach will do nothing on an empty array, so no additional if required.