This is an indirect (yes/no) question structure, not an unreal conditional structure. As such, we can even substitute "whether" for "if"