Add a better validation for leaves.