I'm a little late to the party so I will not repeat what @Heslacher said in his/her review.
A method that doesn't use any members from a class instance should be static (shared). If the method reside in a module (not a class) then you're fine because the method is static (shared) by default.
Now, since it looks like you're creating an extension method, we'll put the method in a module so we can append the Extension attribute.
Public Module DataRowExtensions
<Extension()>
Public Function DTableCellValue(...) As Object
Microsoft provide a .net assembly named System.Data.DataSetExtensions.dll which extend some of the classes located in the the System.Data namespace. One very related class is the DataRowExtensions class and its `Field<T> methods. It's almost identical to your method except the ability to provide a default value.
So I suggest we use the same name (method and parameters) and make it generic.
Public Function Field(Of T)(row As DataRow, columnIndex As Integer, Optional ByVal defaultValue As T = Nothing) As T
The DataRow class has a method named IsNull which accepts both a string (column name) and an integer (column index). Combine this with the short-circuit ternary if operator and the return statement becomes an easy to read one-liner.
Return If(row.IsNull(columnIndex), defaultValue, row.Item(columnIndex))
Apply all the suggestions and the code will look like this:
Imports System.Runtime.CompilerServices
Public Module DataRowExtensions
<Extension()>
Public Function Field(Of T)(row As DataRow, columnIndex As Integer, Optional ByVal defaultValue As T = Nothing) As T
Return If(row.IsNull(columnIndex), defaultValue, row.Item(columnIndex))
End Function
<Extension()>
Public Function Field(Of T)(row As DataRow, columnName As String, Optional ByVal defaultValue As T = Nothing) As T
Return If(row.IsNull(columnName), defaultValue, row.Item(columnName))
End Function
End Module
Usage
Dim firstName As String = table.Rows(0).Field(Of String)(0, "(null)")
Dim firstName As String = table.Rows(0).Field(Of String)("firstName", "(null)")
Inferred by the type of the default value:
Dim firstName As String = table.Rows(0).Field(0, "(null)")
Dim firstName As String = table.Rows(0).Field("firstName", "(null)")