Collectionlink returns string if empty instead of empty array

How to fix collectionlink? returns empty string if empty instead of empty array!!! It’s drive me crazy!!! Why it’s happen??? Why different types??? Plz help!!!