Update model.class.php

Switching order of checking so that the configuration file is evaluted first to save trip to databse