Maybe that check should move before the preceding block that sets MACH, an then add check here that "${MACH}" = ""?
MACH
"${MACH}" = ""