check if var is defined