Javascript Check If Text Exists In String Function