Fix type of parameter? to correctly account for variance.

Closes PR 14315.