See the Expires header description in the RFC.
Now if the value of similar header is not valid HttpHeaders throws IllegalArgumentException.
IMO it should return -1 as in case header is null.
In additions see the linked issue.
We'll be glad to hear any thoughts, why HttpHeaders works now such way?