[SPARK-2024] Do not re-serialize if it is already in Pickle