Only call click handler function if it's not null
Merge pull request #122 from n8ebel/issue120

Fixes #120