Modified search code to return a null when no collection found.