It is good, for a change, to be able to have a say before someone does something, rather than after they have done it and regretted it.
Rule 1 Never act as a guarantor.
Rule 2 Remember rule 1
If you are going to ignore Rules 1 and 2, then
A. Never sign a guarantee unless it has been vetted by a solicitor and he has explained to you exactly what the effect is.
B. Negotiate so that the guarantee is not open ended - it should be limited in time (say six months) or amount (say six months' rent) and preferably both.
Do not be cajoled into standing as guarantor just because you are fond of your niece. You need to think about the possibility that your niece and her boyfriend may split up. You could then find yourself guaranteeing the rent for the boyfriend.
Do not act as a guarantor if a deposit is paid; a deposit ought to be sufficient security.
If you want to offer some help, think seriously about offering to pay a one-off rent insurance premium; it may work out cheaper in the long run.
If the tenancy agreement is signed before you are asked to sign the guarantee then forget about signing the guarantee - the agreement cannot be undone.
P.S. For the sake of completeness I add:
If guaranteeing a student letting make sure you only guarantee your son or daughter's contribution.