some case class validation