SERVER-15438 check wasError before looking inside object for error