[PATCH 1/3] alfred: move interface check into helper function