added an informative error for non-matching grade types