(diary-attrtype-convert): Convert an attribute value string to the desired type.