Checks that type in pointer is type name