added check if categoricalDtype for issue #19278
Checklist for other PRs:

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

Hello @xchoudhury! Thanks for updating the PR.



Cheers ! There are no PEP8 issues in this Pull Request. :beers: 

##### Comment last updated on April 10, 2018 at 03:36 Hours UTC # [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/20644?src=pr&el=h1) Report
> Merging [#20644](https://codecov.io/gh/pandas-dev/pandas/pull/20644?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/e8f206d8192b409bc39da1ba1b2c5bcd8b65cc9f?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `28.57%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/20644/graphs/tree.svg?height=150&token=eZ4WkYLtcO&width=650&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/20644?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #20644      +/-   ##
==========================================
- Coverage   91.83%   91.83%   -0.01%     
==========================================
  Files         153      153              
  Lines       49269    49276       +7     
==========================================
+ Hits        45247    45251       +4     
- Misses       4022     4025       +3
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.22% <28.57%> (-0.01%)` | :arrow_down: |
| #single | `41.9% <14.28%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/20644?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/sparse/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/20644/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3BhcnNlL3Nlcmllcy5weQ==) | `93.75% <28.57%> (-1.46%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/20644/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `84.59% <0%> (+0.2%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/20644?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/20644?src=pr&el=footer). Last update [e8f206d...90756c6](https://codecov.io/gh/pandas-dev/pandas/pull/20644?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
 @xchoudhury can you update? closing as stale, if you want to continue working, pls ping and we can re-open. you will need to merge master.