Re #7714. Added checks for invalid inputs for attributes.