Error #1010

Hey guys,

I keep getting this error

TypeError: Error #1010: A term is undefined and has no properties.
at MethodInfo-1792()
at MethodInfo-1793()

for what i think is this block of code

function toggleProgram(type:String):void {
var mc_icon:marker_icon=programs[type].map_xml.loc*;
if (! mc_icon.visible) {
} else {

and I’m not sure how to remedy. Any help would be appreciated!