better attribute validation.