function validateSafeMethod(object, method) {
  if (!isSafeMethod(object, method)) {
    throw new Error('No access to method "' + method + '"');
  }
}
Validate whether a method is safe.
Throws an error when that's not the case.
@param {Object} object
@param {string} method