Fix return value for empty array
Fix return value for empty strings