Empty array instead of null on search