Switch to checking empty() in the sanitization function. This mirrors the simplifcation change two commits ago.