[BUGFIX] EmConfUtility accesses non-arrays

Properly check for array-type before accessing
or counting the variable.

Resolves: #52045
Releases: 6.2, 6.1, 6.0, 4.7, 4.5
Change-Id: Id161fddadbbcadd462de36e8227278107f2e7a3a
Reviewed-on: https://review.typo3.org/24100
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn