fdo#70812 writerfilter: check for nullptr after dynamic_cast

Happens when we set "no number" in the default para style, which is
already the case for Writer anyway.

Change-Id: I3b262e633e52e4aae039c55d6edb744e36f0f354