Better error message for malformed tests object