Refactor check_for_profile method