xwiki/xwiki-commons — comment on commit da611bbf6730a4fda41c88bb606c7afa0f39aae2
File: xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-default/src/main/java/org/xwiki/component/embed/EmbeddableComponentManager.java line 384
By tmortagne:

you could probably replace the whole if by
if (instance instanceof Disposable)
since instanceof will return false if instance is null.