Or you can return editor.first()
That will still return a jquery object with the first element and return an empty jquery object ([]) if there are no elements.