Fix error when jQuery is trying to do toLowerCase an empty array.