Fix a stupid NPE

Okay so this is really not a behavior change as it converts an
NPE into an illegal argument exception, but still, that's what
should happen (and that's what the upcoming test actually tests
for).

Test: upcoming NetworkAgentTest
Bug: 139268426
Change-Id: I3e17211c03bc74426bf5e2e414ec322d73b0060b
1 file changed