This long switch can be converted to a validation on 'path' if it is path, `else` ensure that the array of allowed param types contains the `param.paramType` value