add required_attributes_present? method to check for required attributes.