Not sure what you are getting at here.  PJUtils::max_expires parses the Contact headers itself, and if there are none, or none with expires parameters, it returns the default parameter specified on the call (here set to -1).  -1 is the signal to the AVP building code to omit the Expires AVP.  I'll clarify the comment slightly.