R: check for NAs after converting the vertex types to logical, in the bipartite functions.