Simple utility for converting data to various types