When any person is required by a Court or officer to execute a bond, with or without sureties, the Court or officer may, except in cases involving a bond for good behavior, allow the person to deposit a sum of money or Government promissory notes of a value determined by the Court or officer as a substitute for executing the bond.