Pulls out common logic from decorator and mixin, and adds check for configuration

Good idea.  I'll add one