Whenever you need to know if VE UI is enabled you could just check $('#ve-edit').exists() (the edit button for VE), but I'm not completely sure if that would be a better solution (but would not require "exporting" another variable to the frontend).