[BUGFIX beta] Defensive check in _addMetamorphCheck to prevent exception  #5233