Refactor the validationRequirementsFromAttributes function to catch None values