Might be simpler and more accurate to just say `has_markdown = getattr(component_class, "markdown", None)`