Check the "Blacklist" and see if the photographer you're working with has been on there. If so, it's best to skip that one.
Don't Shoot Nude. Being naked is a vulnerability and putting yourself in your most vulnerable position is not safe with a stranger (especially if he's straight!). Even famous lingerie and nude photographers have been accused of being predators (David Bellemere, etc.).
Ask Friends. See if any of your friends have shot with the photographer and ask her how it was.
Bring a Friend. Always bring a friend on set if you're testing. Whether it's a makeup artist or just a friend, it's wise never to be one-on-one with another person you don't know. (Obviously on a big production, you're surrounded by many people.) Take a page from the celebrity handbook – they always have their publicist on set.
Tell Your Agent. Your agent works for you. If you don't feel comfortable going to a casting, call him or her and let them know.
Learn Basic Self-Defense. Sadly there's always evil in this world, and it's better you know how to defend yourself. Plus you'll walk with more confidence knowing you can handle a potential threat.