straightforwardly you can't process order if it is null, consider processing the IMessage in the following way:
@Override
public void onMessage(IMessage message) throws JFException {
if (message.getOrder() == null) {
return; // the message is not order-related
}
if (message.getOrder().getLabel().startsWith("OVERNIGHT")
&& message.getType() == IMessage.Type.ORDER_CLOSE_OK
&& message.getReasons().contains(IMessage.Reason.ORDER_CLOSED_BY_SL)) {
//your order-related logic comes here
}
}