[BUGFIX] Test typeof TBE_EDITOR for object not function