I just had the same thing to do. And (of course) it is a very easy thing to do (with vb.net). I'm sure you figured it out already but just for the record:
1. create a vb.net component
2. place the following code where it says your code here
If IsDBNull(x) Then
A = 0 'replace this with the value you need
Else
A = x
End If
3. you only need one input therefore you can delete the default y input in the input manager