There is also one alternative approach more.
Ext.ComponentQuery.query("htmleditor").length > 0