VBA to search for page layer

I am trying to count the number of shapes on the layer "LayerForTextBox" on each page that has that layer. I keep getting the error that it cannot find that layer (which is true, some pages don't have that layer), but I thought I had accounted for that in my If Then statement.  What am I doing wrong?

Sub Test()

Dim ArtisticText As Shape
Dim p As Page
Dim ItemQty As Integer

For Each p In ActiveDocument.Pages
If Not p.Layers("LayerForTextBox") Is Nothing Then
ItemQty = p.Layers("LayerForTextBox").Shapes.count
Set ArtisticText = p.Layers(1).CreateArtisticText(33, -4, ItemQty, cdrLanguageNone, cdrCharSetSymbol, "Bookman Old Style", 400)
End If
If p.Layers.count < 5 Then
End If
Next p
End Sub