Give error for bad trait values