[task] added null checks
Merge pull request #82 from davidmoebius/null_test

[task] added null checks