Bugfix: converter functions. do type check.