Properly check for null in ListSG.next. Fixes #43