What's happening is that a column in one of the rows in your database is empty. When a cell is empty, SQL doesn't send "", it sends the value DBNull. If your table can have empty cells, then you need to check each cell for DBNull. You can use IsDBNull to check that and if it isn't, then you can test your values.
You should look at the documentation for each object your using, specifically
MySqlDataReader.GetString()[
^]
It says, "Call IsDBNull to check for null values before calling this method."
Instead of:
If Not rowsReader.GetString("Null") = "YES" Then
query += " NOT NULL"
End If
try:
If Not rowsReader.IsDBNull("Null") Then
If Not rowsReader.GetString("Null") = "YES" Then
query += " Not Null"
End If
End If
Looking at some resources, I believe you could also write
If (If(Not rowsReader.IsDBNull("Null"), Not rowsReader.GetString("Null") = "YES", False)) Then
query += " Not Null"
End If