'Am getting this error in the following code:

```
string QtyVal = MatCompDtlDataGridView.CurrentCell.Value.ToString();
decimal Result = (Convert.ToDecimal(QtyVal)) / 999;
if (Result == 0)
{
    MessageBox.Show("Quantity value can not be null");
}

```