Refactor request_type detection usage