why doesn't it return EmptyTree instead of None?