check whether string contains substring javascript