[Reviewer: Mike] Check that reg_max_expires is valid before using it 

In applying markups to the code for sto438 I implicitly removed the code that only uses the command line parameter if it's actually valid. This pull request adds some checking back in.