If you are using a strongly-typed dataset then you should do this:
If Not ediTransactionRow.Ispay_id1Null Then
'Do processing here
End If
You are getting the error because a strongly-typed data set retrieves the underlying value and exposes the conversion through the property. For instance, here is essentially what is happening:
Public Property pay_Id1 Then
Get
return DirectCast(me.GetValue("pay_Id1", short)
End Get
'Abbreviated for clarity
End Property
The GetValue method is returning DBNull which cannot be converted to a short.