Fix issue returning null when and empty array is more apropriate