A Question About Scripting Dashboard

Is there a way to script, if “As Overlay” is selected in Mission Control Dashboard, abort script; otherwise, is it possible to write a script that forces “As Space” or “Off” to be selected in Dashboard. The script below is part of a larger script and it’s last piece.

(The larger script - a security device for a piece of software - only works if “As Space” of “Off” are selected in Dashboard. The way it’s configured now: The script stops and requests that the user select “As Space” in Dashboard. Problem is, there’s no consequence to the user selecting “As Overlay.” My problem would be solved if I can “abort script” if “As Overlay” is selected, ; either that or somehow force “As Space” or “Off” and take the user out of the equation.)

Thank you in advance for any help

tell application “System Preferences”
activate
delay 1
tell application “System Events”
tell process “System Preferences”
click menu item “Mission Control” of menu “View” of menu bar 1
tell window “Mission Control”

			display dialog "In Mission Control-Dashboard, Select
					
	AS SPACES"
			
		end tell
	end tell
end tell

end tell
try
do shell script “ps cx|grep DashboardClient”
do shell script “killall Dock”
on error
tell application “Dashboard” to launch
end try