A simple characterization of theories of varieties