Returns an integer value from an attribute