throw an non-js error if "list" is not List (fix #533)