If IsDBNull(e.Command.Parameters("@JobCount")) Then
The above code checks if the Parameter Object is DBNull

It should check if the Parameter's Value is DBNull

Code:
If IsDBNull(e.Command.Parameters("@JobCount").Value) Then