BUG : ValueError in case on NaN value in groupby columns
Fixes GH24740

- [x] closes #24740 
- [x] closes #21151
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

**Before**
```python
In [5]: ds.groupby("b").groups                                                                                   
Out[5]: {'b': Int64Index([1], dtype='int64'), 'c': Int64Index([2], dtype='int64')}
In [6]: ds.groupby("b", observed=True).groups                                                                    
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-6-d76af2ea5948> in <module>
----> 1 ds.groupby("b", observed=True).groups

~/Softwares/pandas/pandas/core/groupby/groupby.py in groups(self)
    388         """
    389         self._assure_grouper()
--> 390         return self.grouper.groups
    391 

```
**After**
```python
In [5]: ds.groupby('b',observed=True).groups                                                                     
Out[5]: {'b': Int64Index([1], dtype='int64'), 'c': Int64Index([2], dtype='int64')}

```

**Better Example**
```python
In [6]:  df = pd.DataFrame({'cat': pd.Categorical(['a', 'c', 'a'], 
   ...:                        categories=['a', 'b', 'd', 'e', 'f']), 
   ...:                        'vals': [1, 2, 3]})                                                               

In [7]: df                                                                                                       
Out[7]: 
   cat  vals
0    a     1
1  NaN     2
2    a     3

In [8]: df.groupby('cat').groups                                                                                 
Out[8]: 
{'a': Int64Index([0, 2], dtype='int64'),
 'b': Int64Index([], dtype='int64'),
 'd': Int64Index([], dtype='int64'),
 'e': Int64Index([], dtype='int64'),
 'f': Int64Index([], dtype='int64')}

In [9]: df.groupby('cat',observed=True).groups                                                                   
Out[9]: {'a': Int64Index([0, 2], dtype='int64')}



```
