Check on element existence

Sometimes there is a mistake, - if the element isn't created.
Merge pull request #87 from ange007/patch-3

Check on element existence