PR for small fixes I'm building up as I work on zd_cluster promote master

Only the one change so far. to fix the [] nilpointerexception

-r or -s still fail with the error
`Failed preflight check: I can't rehome the original master -- it has no slave user or password.`

cc @osheroff