returning empty array instead of null