javascript check if span has text