Avoid NullPointException.
Merge pull request #5 from larrytin/master

Avoid NullPointException.