Handle nil gracefully

Handle nil as though it were zero.
Merge pull request #5 from latortuga/nil-handling

Handle nil gracefully