When you filter a DataTable and the resulting DataTable does not have any rows, accessing the first row (dt_input_wrongCat.Rows(0)) will cause an error,To prevent the error check if the DataTable has any rows before trying to access a specific row.
If dt_input_wrongCat.Rows.Count = 0 OrElse (dt_input_wrongCat.Rows.Count <= 1 AndAlso dt_input_wrongCat.Rows(0).ItemArray.All(Function(x) String.IsNullOrEmpty(x.ToString.Trim))) Then
' Handle the case where the DataTable is empty or the first row has all empty cells
' Your logic here
Else
' Handle the case where the DataTable has the required data
' Your logic here
End If
Your DataTable is returning no rows and you are using index 0 in your condition,
Hence it is failing, you need to check for rowCount>0 first and then use other queries.