error handling for names