Rs.DocumentPath() returns stealth None object - am I doing something wrong?

Hi all,
I ran into an issue catching a None object delivered by rs.DocumentPath(). I wish to catch whether the user is working in a saved or non saved file and need the path if it is saved. However the rs.DocumentPath() returns a string type None if the file is not saved yet. If I try to catch that None object it fails with all 4 versions below. The debugger tells me the None returned is a string.

        strPath=rs.DocumentPath()
        if strPath is "None":
        #if strPath is None:
        #if strPath==None:
        #if strPath=="None":
            print "No document path, abnormal..."

Any help here please ?

On my phone so unable to test:
IsEmpty( ) or testing the length len ( ) is probably an option.

Edit: how about testing the strPath

If not strPath:

HTH
-Willem

Willem,
thanks for the pointer. Indeed checking ‘if not strPath:’ works. Which is really strange as the debugger says the variable has a “None” string inside.