Added validate simple types helper.