Convert doctrine collection which has not been extracted to a empty array