LevelQ

LevelQ[expr]
tests whether expr is a valid level specification.