Protect against an empty array.