I think it's good to check that, but not in this bit of the code. I think the handler should be policing the API and potentially rejecting requests with incorrect values, but this method should be able to expect that its arguments are sensible and match the spec.

I think the chance that the IMS specs will change and we'll want to set a different value on these fields is so unlikely that we shouldn't be adding unnecessary flexibility (and the risk of bugs) into the code.