[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
Can you declare these with separate statements?  It makes debugging MUCH easier.