Interesting function, but I suggest to modify the code to add the schema to the existence check because you can have two tables with the same name, one for input and one for logging incorrect data. Also I would suggest to add a join to the INFORMATION_SCHEMA.TABLES in order to be know you are interested in a table not a view.
So the select statement should be
FROM INFORMATION_SCHEMA.Columns C
JOIN INFORMATION_SCHEMA.TABLES T ON C.TABLE_NAME = T.TABLE_NAME
WHERE T.TABLE_NAME = @TableName AND T.SCHEMA_NAME = @SchemaName AND
AND COLUMN_NAME = @ColumnName and T.TABLE_TYPE = 'BASE TABLE'