Add/check expiry of js objects