Various validation helpers.