Check if leaves are in same level