Missing check for null when looping on unsorted comments