if and while condition type checks added