Updated exception message for empty arrays.