Trim and convert case for consistency