Was unable to reproduce the issue, even with the user::managed module, but added an extra check in this PR: https://github.com/puppetlabs/puppet/pull/8159 in case the function that retrieves the current expiry settings is not a numeric type.