Since otp can be None, We want to_bytes(otp, nonstring='passthru')