[fix] check for err.stack's existence in merge().