[SPARK-3447][SQL] Remove explicit conversion with JListWrapper to avoid NPE