bug fix, in breadth first search push only non nil values to queue

Committer: Moritz Hamann <mohikaner@quantentunnel.de>