Throw an error when an object definition can't be found