To check for null and empty:
if (mydatagridview == null || mydatagridview.Rows.Count == 0)
{
}
Rows.Count doesn't calculate the rows at the time of calling, but returns a value that is updated when adding and deleting rows. There is no problem calling it to check if the DataGridView is empty.