check for empty arrays