PyDumper: Fix test for next() method.
The test used for the proper next() method could trigger a null pointer dereference if the container was empty. Fix by testing the class, rather than the object.
The test used for the proper next() method could trigger a null pointer dereference if the container was empty. Fix by testing the class, rather than the object.