possibly worth adding a helper function so we don't duplicate the logic from db/models/options.py?