The types are atoms from the set: string, atom, var, integer, rational, float, breal, compound, handle, goal.
Success:
      type_of(X,T).         (gives T=var).
      type_of([1,2],T).     (gives T=compound).
      type_of([],atom).
      type_of(#,atom).
      type_of($,atom).
      type_of(*,atom).
      type_of(/,atom).
      type_of(\,atom).
      type_of("a",string).
      type_of(1,integer).
      type_of(123456789012345,integer).
      type_of(1_3,rational).
      type_of(1.0,float).
      type_of(0.99__1.01,breal).
      type_of(a(b),compound).
      bag_create(B), type_of(B, handle).
      record(k, a), recorded(k, _, R), type_of(R, handle).
      make_suspension(true,3,S), type_of(S, goal).
Fail:
      type_of(2.0,integer).
      type_of(2.0,float).
Error:
      type_of(2,"atom").  (Error 5).