Added type enforcement for sleep state