Abstract the is_active test