Tooltip functions should only run if given valid element

Alternatively you could find where one of these functions is being called with an invalid element and remove that

Fixes #12