Public Overloads Shared Function nz(ByVal obj As Object, ByVal strReplacement As String) As String
        Try
            If (obj Is Nothing OrElse IsDBNull(obj) OrElse obj.ToString().Length = 0) Then
                Return strReplacement
            Else
                Return obj
            End If
        Catch e As Exception
            Return strReplacement
        End Try
End Function

Public Overloads Shared Function nz(ByVal obj As Object, ByVal lngReplacement As Long) As Long
        Try
            If (obj Is Nothing OrElse IsDBNull(obj) OrElse obj.ToString().Length = 0) Then
                Return lngReplacement
            Else
                Return obj
            End If
        Catch e As Exception
            Return lngReplacement
        End Try
End Function