Please check the return value of emsmdbp_get_mailbox to ensure mailbox_object is not NULL.