Fix getting namespace if $mailbox is null.