throw error if we define no states