Fixed NPE in Poller and bad null logic in JNI.
Merge pull request #219 from svirpridon/master

Poller fixes