repeat from XML PR: Do we need is_valid