Added type checking function, stil need to add for unary/binary
expressions