simple small validation util