Do not merge: Add some input checking to prevent problems

Adding nulls can cause unhappiness.  It's suspected as a cause of 3495045.

bug:3495045
Change-Id: I925c965ef64032fc57849bf15fe9b11f4bc99351
1 file changed