A judge reveals an easy way to protect yourself if you loan a friend money