[SPARK-2364][STREAMING] ShuffledDStream run tasks only when dstream has partition items

 ShuffledDStream run tasks no matter whether dstream has partition items 

this patch fixed it
Here white space too.

Also shall we wrap with try-catch here, which line will throw NPE ? 

I don't think catch NPE is a good choice here, NPE might be introduce by unknown bug, we should fix it, not catch it in runtime.