This function returns one of the following values:
0 if the attribute type is found.
-1 if it is not.