Better whitespace-aware check