As discussed on HipChat, could you not make the ajax call if not needed (i.e. if `result_types` is empty).