Added extra check to avoid NPE if package does not exist.

BUG: 26685616

Change-Id: I244e479fd9668bc4f07b8797ce2fc1e1df7a4d28
1 file changed