Use empty string rather than None to avoid TypeError
Improve error messages.