Some writing courses will advise you to write what you know. I've always thought this is very odd advice ... because it means, for example, that I should not be writing about Nicholas Flamel, because I didn't live in France in the 15th Century, I was not an alchemyst, am not immortal (despite the rumours) and do not know magic.
Michael Scott