Add null pointer checks to cope with initialisation errors
Merge pull request #880 from cdjackson/zwave-NPE

Add null pointer checks to cope with initialisation errors