Add unless_nil option to Cache#write

Option to allow cache to skip storing nil values.