guiarding against nil block