Add a NULL check into register_reply