Add some input checking to prevent problems

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

bug:3495045
Change-Id: I1d83a5461caa0b8de9602f93a40681e7963b915e
1 file changed
tree: 62c0ba2482d050b1f136e3ed5e0b3ef2388e07fd
  1. core/
  2. services/