Fixed null-check
Merge pull request #8 from PhlegmaticGuy/master

Fixed null-check