Fix null pointer bug in SetCollectorCommand.

SetCollectorCommand will no longer cause the collector to throw
NullPointerExceptions.