Call the boot method in constructor only if the model is defined.