Check for style and font in basic

I have a Basic macro, called from Calc but creating a Writer document, which sets a paragraph style, page style (PageDescName) and font, which I have defined. If any is missing and error arises. Can I check for the existence of these properties before setting them?

oCursor = oFrame.Text.createTextCursor()
oCursor.PageDescName = "FaxDiary"
oCursor.ParaStyleName = "FaxDiary"
...
oCursor.CharFontName = "Moon Phases"

OK, I have a solution to the Style parts of the question.
For paragraph style a trap might look like this:

If Not oFrame.StyleFamilies.getByName("ParagraphStyles").hasByName("FaxDiary") Then
  MsgBox "Paragraph style 'FaxDiary' is not present. Exiting" : Exit Sub
Endif 

And likewise for page style:

If Not oFrame.StyleFamilies.getByName("PageStyles").hasByName("FaxDiary") Then
  MsgBox "Page style 'FaxDiary' is not present. Exiting" : Exit Sub
Endif 

I also have a solution to the font question, based on Andrew Pitonyak’s OOME listing 299. It seems relatively cumbersome, and I wonder if one cannot access the font list directly. Or even access the Frame (already defined and used above).

oFonts() = ThisComponent.getCurrentController().getFrame.getContainerWindow().getFontDescriptors()
Moon = False
For i = LBound(oFonts()) To UBound(oFonts())
  If oFonts(i).Name = "Moon Phases" Then Moon = True
Next
If Not Moon Then MsgBox "Font 'Moon Phases' is not present. Exiting." : Exit Sub