function mustHaveProperty(obj, property, valid) {
    if (!obj.hasOwnProperty(property)) {
        $ERROR("Object is missing property " + property + ".");
    }
    testProperty(obj, property, valid);
}
Tests whether the given object has the named property with a valid value
and the default attributes of the properties of an object literal.
@param {Object} obj the object to be tested.
@param {string} property the name of the property
@param {Function|Array} valid either a function that tests value for validity and returns a boolean,
    an array of valid values.
@exception if the property is missing or has an invalid value.