how to defina a constraint that one of two fields (or both) must be provided but they can't be both `null`