Detecting and Characterizing Planning in Language Models