Adding tests for null and correcting ttl logic.
Merge pull request #2 from nuxlli/master

Adding tests for null and correcting ttl logic.