layers: Merge enum array NULL/value checks

- Merge the NULL checks and enumeration value checks performed for arrays
  of enumeration values into a single function call.  This is consistent
  with the validation for arrays of other types.
- Reduce duplicate array checking code.

Change-Id: I8c4e05542bb2f52f5623fe6c7ed3629b9b2680e0
2 files changed