Check array key instead of using isset().

This is because isset(NULL) === TRUE. GH-17.
Don't check expiry if null and we allow it.

GH-17.