handling the exception when the text() or html() call with a non-exist element