Check for array of events first, to avoid illegal string check on arrays,
fixes #17023