Better NPE prevention in bind() and unbind()

- Version 1.1.1
- Added checks to make sure that gInputWindow is not null before adding
or removing listeners