Make sure that the input is a dissimilarity object
check_D(D)
D
dissimilarity object.
returns an error if D is not a dissimilarity. Otherwise D as a matrix.