Correct the wrong usage of new api

change mtd[ws] == None to not mtd.doesExist(ws)

re #7863
Merge remote-tracking branch 'origin/bugfix/7863_inelastic_api'