Detect invalid collectors.

The program would blow up anyway, but provide users with a more friendly
error message.

Change-Id: If70fc27b61963058af036568b88535b7f2dcff3f
Merge "Detect invalid collectors."