One of my colleagues found another way and that is to wrap this.element with jquery $(this.element). If this.element is null, then we get back an empty jQuery element which should not error out even if you try to call .html() on it.
This seems to be cleaner and doesn't require adding if(this.element) check everywhere.
Thanks,
Colin