checkGraph: remove erroneous 'new' in throw statement