Move empty topic check to refreshMetadata