typeForString
if (typeForString(optarg, &attrType) != B_OK)
if (typeForString(code, &attrType) == B_OK)