Adding type for attribute in object.