Rather than testing for type, it's sometimes useful to ask if the current event can be queried for a certain characteristic:
public boolean isStartElement()
public boolean isEndElement()
public boolean isCharacters()
public boolean isWhiteSpace()
public boolean hasText()
public boolean hasName()
public boolean hasNext()