Fix NPE when kind is null in getBestType

Fix alternate insertChild() method to detect and bail on null kind just
like primary insertChild() method does. Also change getBestValidType()
not to crash on null kind.

Bug:12490438
Change-Id: I82c351ccd5a880fb8bc71b5b27ffb2662c071be3
1 file changed
tree: 35a687cab84d9f3daac4277ab9b237d9332aa31c
  1. src/
  2. TestCommon/
  3. tests/