testing undefined variable passing
updated type checks