Fix "Uncaught TypeError: Cannot call method 'stub' of null"

* if the link is null, the stub is null
Merge pull request #97 from reciprocity/feature/fix-type-error

Fix "Uncaught TypeError: Cannot call method 'stub' of null"