There v their

Hello

This example is actually given by LT (there v their) but I have noticed that in the two sentences below

Their is a mistake

and

It it there mistake

only the first mistake is found

So I guess I need a rule and although I get the general idea of writing rules, I’m completely surpassed by the intricacies.

I know that the rule should stipulate that if

1 ‘there’ is followed immediately by a noun (noun class), the sentence is probably wrong

eg He told there mother

2 ‘there’ is not followed by ‘is|are|some|any|someone|anyone’ or a modal verb ,

There is a man at the door
There are two men at the door
Is there any|some milk in the fridge?
Is there someone|anyone at the door?
There can|could|might|should be four reasons?

it is probably wrong

There a man at the door
There two men at the door
Is there any|some milk in the fridge? (not sure about 'is there milk in the fridge)
Is there at the door?
There be four reasons?

I’m also wondering how to handle the contraction 'there’s in the rules!

So what would be the easiest way to write this rule (in terms of simplicity) ?

And would anyone be prepared to write it cos I am simply not capable?

Sorry to ask but it is a rule that would be really useful and perhaps should be in LT for everyone.