add checkType to each type

Add a checkType function that check the inner part (integrity of the
content) and return the type. Add a new type "AlreadyDefined" when we
try to define again a variable that has already be defined.