Function ensureValidWordDefinition