The existence and the tenor or effect of all foreign laws may be proved as facts by parol evidence; but, if it appears that the law in question is contained in a written statute or code, the court may, in its discretion, reject any evidence of such law which is not accompanied by a copy thereof.