A warehouseman is justified in delivering the grain, subject to the provisions of the three following sections, to one who is: (a) The person lawfully entitled to the possession of the grain, or his agent; (b) a person who is either himself entitled to the delivery by the terms of a nonnegotiable receipt issued for the grain, or who has written authority from the person so entitled either endorsed upon the receipt or written upon another paper; or (c) a person in possession of a negotiable receipt by the terms of which the grains are deliverable to him or order or to bearer, or which has been endorsed to him or in blank by the person to whom delivery was promised by the terms of the receipts or by his mediate or immediate endorsee.