If Variable Contains String Javascript Methods Types