Null check the master address in hasOnGoingMigrationMaster

Null check the master address before attempting to ask the master node if it has an ongoing migration