check for nil term