 <p>Without seeing your stack trace, I'm only guessing, but:</p> <p>From the line you say is the error, it means that <code>div</code> is null, which would indicate that the previous line is the culprit, which would mean that your <code>doc</code> has no Element with an Id of <code>eventTTL</code>.</p> <p>Try ensuring that your <code>doc</code> is valid, and the it actually has a <code>eventTTL</code>.</p>