add smart constructors for null and empty graph