Let $K=K_1\cup\dots\cup K_n$ and $K_i$ are convex.
Consider the nerve $N$ of your covering $K_i$. Note that $N$ is homotopically equivalent to $K$. (To find $N$ you only need an algorithm which decides that given subcollection of $K_i$ has nonempty intersection.)
CalculatingCalculate the homology groups of $N$ and you may get a "no" answer if you are (un)lucky.