added more type statement validation