AI and the Law: Evaluating ChatGPT's Performance in Legal Classification