ifHasModel

fun ifHasModel(consumer: Consumer<M>)

If the model is present, call the given consumer with it, otherwise do nothing.