check for error in  assoc array