Fix null exception on empty results.