Added utility function to get overlay state