Checks if a model is a generalized additive modelSource:
Small helper that checks if a model is a generalized additive model.
This function only returns
TRUE when the model inherits from a
typical GAM model class and when smooth terms are present in the model
formula. If model has no smooth terms or is not from a typical gam class,
FALSE is returned.