routes/orders.js: add nullity check.