Tool for automatically casting variables to certain data types