Fix handling of nil

Automatically set number to 0 when nil is passed in.
Merge pull request #3 from latortuga/fix-nil-handling

Fix handling of nil