Refactor the is_admin function

This construction feels clearer than using if/else.