Navigatable (@Nullable final MavenDomProfile profile) { if (profile == null) return null; XmlElement xmlElement = profile.getId().getXmlElement(); return xmlElement instanceof Navigatable ? (Navigatable)xmlElement : null; }