Catch NoSuchMethodExceptions in graph contructors