How about SliceExp::toStaticArrayType() ? Returns the type if it succeeds, null if it fails.