Updating validations to properly check presence of attributes before using them in calculations