Most probably it's the same problem as in getLaunchIntentForPackage is null for some apps.
Not really a duplicate (since OP couldn't trace the offending line, which is known in linked question), but if someone faces this problem, linked question's solution might help.