check_model function

Generic S3 method for checking if the model is supported and model preprocessing