Guard against null pointer exception
Merge pull request #24 from bytekast/master

Guard against null pointer exception