added TypeError in case of unhandleable value