fix null error if element defs not exist.
Merge pull request #5 from throrin19/patch-node

fix null error if element defs not exist.