Modified remove column term filtering to handle also NAs