Use strict comparison operators with getAttribute
Include minor !isMatched fix suggested by andytuba