Return nan if parameter has zero variance

Closes #112