fixes undefined merge method for nil object