Fixed a null case in InvHelper.canMerge()