Extra check for dealing with nil values.
Merge pull request #2 from YorickPeterse/master

Extra check for dealing with nil values.