check if var is bound first