[BUGFIX] Defensive check in _addMetamorphCheck to prevent exception  #52...

Added check to return out of func if either DOM query returns null. This fixes #5233