Remove nil elements from result array