Fix NullPointerException
Merge pull request #48 from swiggins83/null-crash

Fix NullPointerException