check for errors before trying to process boolean result

bugz: 38677