Fixed test for null

The input parameter must checked for null. Otherwise the next condition might fail with an NullPointerException.
Merge pull request #10 from Joerny/master

Fixed test for null