N3
ことがある
Something is possible, Sometimes, Occasionally, There are times when
タナカ先生の授業はたまに楽しいことがある。
There are times where Mr. Tanaka's classes are fun.
Explanation
Dictionary or negative form + 「ことがある」 means 'sometimes', for things that happen now and then: 「普段は自炊するが、疲れた時は外食することがある」 (I usually cook at home, but when I'm tired I sometimes eat out), 「このパソコンは時々フリーズすることがある」 (This computer sometimes freezes). With a negative it is 'sometimes I can't...': 「朝起きられないことがある」 (Sometimes I can't get up in the morning). It goes with 「たまに」 and 「時々」.
Mixed up with
Don't confuse it with 「~たことがある」: dictionary form + 「ことがある」 is 'sometimes happens'; past form + 「ことがある」 is a past experience: 「日本へ行ったことがある」 (I have been to Japan).
「~こともある」 swaps 「が」 for 「も」 and stresses that even such a rare case happens at times.