Expresses that something doesn't need to be done or there's no occasion to do it; 'don't have to', 'not necessary'.
Verb-dictionary form + ことはない, い-Adjective + ことはない, な-Adjective + であることはない, Noun + であることはない
Long explanation:
The ~ことはない grammar point is used to express that doing something is not necessary, or there's no occasion to do it. It implies that although a certain action might not be needed, it does not mean it is forbidden. The formation differs depending on whether it is used with a verb, い-adjective, な-adjective, or noun.