refactored assignDom to call the newly defined method.
checking for null before registeringMatchCondition.
code refactoring

moved the check for matchCond and matching the selector in a function.
minor