Check if X is scipy sparse