throwing errors if required properties are not set