Check linkData keys to avoid KeyError

fixes #693 on github.
Merge pull request #720 from steventlamb/bug/693/tree_key_error_page

Check linkData keys to avoid KeyError