Create a function which check type names