added test for list and added exception to handle non supported types